Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
Windows XP
Description
When creating a rolling file appender (see configuration below), the log file within the zipped archive has no extension. This is quite annoying on a Windows system since Windows has no clue how to open a file without extension. You have to rename the file and add the correct extension or choose the program to open over and over again.
Suggested fix: make the file in the archive inherit the extension from the original log file. So for an archive named "log-2010-08-11.zip", the log file within the archive would become "log-2010-08-11.txt", since the original log file was "log.txt".
<appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>log.txt</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log-%d
.zip</fileNamePattern>
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%-4relative [%thread] %-5level %logger
- %msg%n</pattern>
</encoder>
</appender>