
[ http://jira.qos.ch/browse/LBCLASSIC-167?page=com.atlassian.jira.plugin.syste... ] Torsten Juergeleit edited comment on LBCLASSIC-167 at 4/22/10 12:19 PM: ------------------------------------------------------------------------ This is related to a limitation of RenameUtil.rename() as described in LBCORE-151 was (Author: tjuerge): This is related to a limitation of RenameUtil.rename() as described in #LBCORE-151
RollingFileAppender does not auto create subdirectories in some circumstances -----------------------------------------------------------------------------
Key: LBCLASSIC-167 URL: http://jira.qos.ch/browse/LBCLASSIC-167 Project: logback-classic Issue Type: Bug Components: appender Affects Versions: 0.917 Reporter: Rick Janda Assignee: Ceki Gulcu
If the FileNamePattern of the rollingPolicy contains another directory than the File element of the appender, than the directory in the FileNamePattern is not created automatically. The OnConsoleErrorListener writes out the following error in this case: -ERROR in c.q.l.core.rolling.helper.Compress - Error occurred while compressing [/opt/baa-logserver/logs/logback.log33794048136194907.tmp] into [/opt/baa-logserver/logs/archive/logback_2009-10-26.log.zip]. java.io.FileNotFoundException: /opt/baa-logserver/logs/archive/logback_2009-10-26.log.zip (No such file or directory) at java.io.FileNotFoundException: /opt/baa-logserver/logs/archive/logback_2009-10-26.log.zip (No such file or directory) The appender is configured as followed (files are rolled into a archive directory on daily basis):
<appender name="LOGBACK" class="ch.qos.logback.core.rolling.RollingFileAppender"> <File>${LOG_DIR}/logback.log</File> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <FileNamePattern>${LOG_DIR}/archive/logback_%d{yyyy-MM-dd}.log.zip</FileNamePattern> <MaxHistory>${MAX_HISTORY_DAYS}</MaxHistory> </rollingPolicy> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern>%date{dd-MM-yyyy HH:mm:ss.SSS} [%contextName] \(%mdc{refId}\) %-5level %logger{0} - %msg%n%xEx{full}</Pattern> </layout> </appender>
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira