I have the following RollingFileappender in my logback configuration file. This confuses me. Did is get something wrong? Improve this question. Community Bot 1 1 1 silver badge. Dimitri Dewaele Dimitri Dewaele 9, 18 18 gold badges 73 73 silver badges bronze badges.
Add a comment. Active Oldest Votes. Improve this answer. Mister Smith Mister Smith Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. MaxSizeRollBackups Gets or sets the maximum number of backup files that are kept before the oldest is erased. Name inherited from AppenderSkeleton Gets or sets the name of this appender.
PreserveLogFileNameExtension Gets or sets a value indicating whether to preserve the file name extension when rolling. RollingStyle Gets or sets the rolling style. StaticLogFileName Gets or sets a value indicating whether to always log to the same file.
Threshold inherited from AppenderSkeleton Gets or sets the threshold Level of this appender. Layout to be set. Copyright The Apache Software Foundation. AppendToFile inherited from FileAppender. Gets or sets a flag that indicates whether the file should be appended to or overwritten.
Gets or sets the date pattern to be used for generating file names when rolling over on date. Gets or sets the strategy for determining the current date and time. Encoding inherited from FileAppender. ErrorHandler inherited from TextWriterAppender. File inherited from FileAppender. FilterHead inherited from AppenderSkeleton. I've tried all the answers, but there was always something missing and not functioning as expected for me.
Then I experimented a bit with the hints given in each answer and was successful with the following setting:. The issue with other combinations of parameters was that the latest file didn't have the time pattern, or that the time pattern was appended as. Make sure you have the preserveLogFileNameExtension value attribute set to true.
0コメント