<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<pre style="background-color: rgb(255, 255, 255); "><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">(Sorry, message issues, trying again)</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"><br></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">Hello,</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">I had this code well tested when I wrote it months ago, but now it is failing. The only issue is the SiftingAppender:</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"><br></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"><appender name="SIFTING" class="ch.qos.logback.classic.sift.SiftingAppender"></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> <discriminator class="ch.qos.logback.classic.sift.MDCBasedDiscriminator"></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> <key>userId</key></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> <defaultValue>none</defaultValue></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> </discriminator></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> <sift></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> <appender name="SIFTING-${userId}" class="ch.qos.logback.core.rolling.RollingFileAppender"></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> <fileNamePattern>${log_dir}/sifting/log.${userId}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> <maxHistory>30</maxHistory></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> <cleanHistoryOnStart>true</cleanHistoryOnStart></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> <maxFileSize>25MB</maxFileSize></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> </timeBasedFileNamingAndTriggeringPolicy></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> </rollingPolicy></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> <encoder><pattern>%date %-5level %logger %X{userId} - %message%n%xThrowable{full}</pattern></encoder></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> </appender></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"> </sift></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"></appender></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"><br></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">It is simply not logging anything at all. The startup info is short, maybe indicating that it is not being properly initialized:</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">10:29:18,102 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[MAIN] - File property is set to [null]</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">10:29:18,102 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.sift.SiftingAppender]</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">10:29:18,107 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [SIFTING]</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">10:29:18,107 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [package.project.x] to false</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">...</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">10:29:18,727 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to WARN</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">10:29:18,727 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [MAIN] to Logger[ROOT]</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">10:29:18,727 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [SIFTING] to Logger[package.project]</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">10:29:18,727 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"><br></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">I was upgrading from logback 1.0 to 1.0.1 to use 'cleanHistoryOnStart' when I noticed this. I rolled back to 1.0, but nothing changed. Following other mails and messages around, I tried my RollingFileAppender by itself, and it works fine. The MDC is also fine, as it is printed in my other appenders. I also used <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /> , but nothing useful.</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"><br></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">Right now I have no idea how to proceed or how can I investigate this further.</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">Any help is appreciated.</span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;"><br></span></font></pre><pre><font color="#2a2a2a"><span style="line-height: 17px; white-space: normal;">Thanks! </span></font></pre></pre> </div></body>
</html>