[logback-user] sifting appender is not compressing the last log file

Shaul Zevin ShaulZ at perfectomobile.com
Tue Nov 27 09:54:42 CET 2012


Email entry typo, please ignore it, it has nothing to do with the problem.

Thanks,
   Shaul

From: logback-user-bounces at qos.ch [mailto:logback-user-bounces at qos.ch] On Behalf Of Chris Pratt
Sent: Monday, November 26, 2012 7:46 PM
To: logback users list
Subject: Re: [logback-user] sifting appender is not compressing the last log file

I have no idea if this is a email entry typo or an actual problem but you have <file>> which would try to name the file with an invalid character. I'm not sure what havoc that could cause.
  (*Chris*)

On Mon, Nov 26, 2012 at 6:13 AM, Shaul Zevin <ShaulZ at perfectomobile.com<mailto:ShaulZ at perfectomobile.com>> wrote:
Hello,

Similar problem was already reported about a year ago:

http://mailman.qos.ch/pipermail/logback-user/2011-November/002706.html

I wonder if the problem is going to be fixed in the upcoming version.
If not, what should be the most simple workaround?

The most disturbing scenario related to this bug is that each value of a sifting attribute creates just one log file.
The sift appender configuration is set for compression.
The bug causes the log file to be left uncompressed, therefore no files are eventually compressed at all.

       <appender name="EXECUTION-SIFT" class="ch.qos.logback.classic.sift.SiftingAppender">
              <discriminator>

                    <key>userid</key>
                     <defaultValue>noname</defaultValue>
              </discriminator>
              <sift>
                     <appender name="EXECUTION" class="ch.qos.logback.core.rolling.RollingFileAppender">
                           <file>>${userid}.execution.log</file>
                           <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
                                  <!-- daily rollover -->

                                   <fileNamePattern>${userid}.execution.%i.log.zip</fileNamePattern>
                                  <maxIndex>100</maxIndex>
                           </rollingPolicy>
                           <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
                                  <maxFileSize>${logFile.maxSize}</maxFileSize>
                           </triggeringPolicy>
                           <encoder>
                                  <pattern>%date{yyMMdd HH:mm:ss} %-5level %msg%n</pattern>
                                  <charset>UTF-8</charset>
                           </encoder>
                     </appender>
              </sift>
       </appender>

Thanks,
   Shaul


The information contained in this message is proprietary to the sender, protected from disclosure, and may be privileged. The information is intended to be conveyed only to the designated recipient(s) of the message. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, use, distribution or copying of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you.

_______________________________________________
Logback-user mailing list
Logback-user at qos.ch<mailto:Logback-user at qos.ch>
http://mailman.qos.ch/mailman/listinfo/logback-user


The information contained in this message is proprietary to the sender, protected from disclosure, and may be privileged. The information is intended to be conveyed only to the designated recipient(s) of the message. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, use, distribution or copying of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20121127/23d1ed64/attachment-0001.html>


More information about the Logback-user mailing list