[logback-user] Split logs to different files by MDC?
ceki
ceki at qos.ch
Thu Jun 14 18:57:41 CEST 2012
Hi Yura,
There multiple errors in the config you provided (independent of
SiftingAppender). As a general recommendation, you should set the
debug attribute to true to see the errors.
<configuration debug="true">
...
</configuration?
Here are a few hints.
Hint1: ch.qos.logback.core.rolling.RollingFileAppender not FileAppender
Hint2: SizeAndTimeBasedFNATPExt does not exist
HTH,
--
Ceki
http://twitter.com/#!/ceki
On 14.06.2012 16:15, Yura Levandovskyy wrote:
> This is the appender in question:
>
> <appender name="SIFT" class="ch.qos.logback.classic.sift.SiftingAppender">
> <discriminator>
> <key>variable</key>
> <defaultValue>default</defaultValue>
> </discriminator>
> <sift>
> <appender name="FILE-${variable}" class="ch.qos.logback.core.FileAppender">
> <file>${home}/logs/${variable}.log</file>
> <append>false</append>
> <layout class="ch.qos.logback.classic.PatternLayout">
> <pattern>[%X{variable}]</pattern>
> </layout>
> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
> <fileNamePattern>${home}/logs/${variable}.%d{yyyy-MM-dd}.%d{HHmm,aux}.%i.log</fileNamePattern>
>
> <timeBasedFileNamingAndTriggeringPolicy
> class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATPExt">
> <maxFileSize>50KB</maxFileSize>
> </timeBasedFileNamingAndTriggeringPolicy>
> <maxHistory>30</maxHistory>
> </rollingPolicy>
> </appender>
> </sift>
> </appender>
>
More information about the Logback-user
mailing list