What is --log-file-appender flat
App Development2 posts135 views1 likesLast activity Mar 2024
WA
WallaceKellyOP
Mar 2024I see the following in the Logging docs:
--log-file-appender=flat|rolling|off
configures if and how logging to a file should be done.
The rolling appender will roll the files
according to the defined date-time pattern.
--log-file-rolling-history=12
configures the number of historical files to keep
when using the rolling appender.
--log-file-rolling-pattern=YYYY-mm-dd
configures the rolling file suffix
(and therefore the frequency)
of how files should be rolled.
--log-truncate
configures whether the log file
should be truncated on startup.
Does --log-file-appender off mean that files are overwritten instead of appended to? Is that different than --log-truncate? What is --log-file-appender=flat ?
WA
WallaceKelly
Mar 2024I experimented with these options. Here is what I have inferred:
-
--log-file-appenderrollingis the default. It renames the current log file, as needed, based on the date pattern.flatdisables the rolling feature. Log files are simply appended to. The rolling history and rolling patterns parameters are ignored.offdisables writing to log files altogether.
-
--log-truncate- is only applicable with
–log-file-appender flatoption - replaces any existing log file at startup.
- is only applicable with
Double-check me on this and let me know if I’ve missed something.