Paulo R P Andrade (JIRA | 5 Oct 2010 22:38
Picon

[JIRA] Updated: (LBCORE-169) RollingFileAppender/TimeBasedRollingPolicy failing to ZIP files in different directory


     [
http://jira.qos.ch/browse/LBCORE-169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paulo R P Andrade updated LBCORE-169:
-------------------------------------

    Attachment: LBCORE-169_patch.txt

> RollingFileAppender/TimeBasedRollingPolicy failing to ZIP files in different directory
> --------------------------------------------------------------------------------------
>
>                 Key: LBCORE-169
>                 URL: http://jira.qos.ch/browse/LBCORE-169
>             Project: logback-core
>          Issue Type: Bug
>          Components: Rolling
>    Affects Versions: 0.9.24
>            Reporter: Tomasz Nurkiewicz
>            Assignee: Logback dev list
>         Attachments: LBCORE-169.zip, LBCORE-169_patch.txt
>
>
> When using ZIP feature to compress old log files, Logback does not allow to put ZIP files in different
directory like in this example:
> <file>logs\server.log</file>
> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
>   <fileNamePattern>logs\arch\server.%d{yyyy-MM-dd_HHmm}.log.zip</fileNamePattern>
> </rollingPolicy>
> Running the attached test maven project (it takes 1 minute to run) will create
server.log3560979839057.tmp (or similar) temporary file instead of ZIP file in /arch subdirectory
(preferably this directory should be created if not exists). If fileNamePattern in rollingPolicy is
changed to: "logs\server.%d{yyyy-MM-dd_HHmm}.log.zip" everything works as expected.
> The root of this issue is to be able to automatically ZIP files AND archive them in different directory. It
would be great to be able to use date placeholders in folder names, for instance:
> <fileNamePattern>logs\arch-%d{yyyy-MM}\server.%d{yyyy-MM-dd_HHmm}.log.zip</fileNamePattern>
> so that Logback would automatically create folders for each month with ZIPped files.

--

-- 
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

Gmane