[logback-user] logback additivity level is not working
Ceki Gulcu
ceki at qos.ch
Fri Jun 24 20:21:34 UTC 2016
Hi Ted,
From what I can tell, you need to add a ThresholdFilter to the appender
named "errorAppender" to achieve what you describe.
Cheers,
--
Ceki
[1] http://logback.qos.ch/manual/filters.html#thresholdFilter
On 6/24/2016 19:22, Ted Smith wrote:
> Hello:
>
> I have the following config
>
> <logger name="a.b.c.Klass" level="trace" additivity="true">
> <appender-ref ref="aSiftAppenderUsingCustomMarker" />
> </logger>
> <logger name="a.b" level="error" additivity="false">
> <appender-ref ref="errorAppender" />
> </logger>
>
> as you can see, I am trying to capture all "error" level messages (and
> discard lower levels) from
> child loggers into the "errorAppender", even though child loggers are
> at trace level, which would log to their own siftAppenders.
>
> But all the trace logs still get into error appenders, even though the
> level is clearly set to "error"
>
> Could it be due to the use of marker or siftappender in my log like
>
> log.trace(marker,message)
>
> but the error logger should still check the level and disregard any
> marker info.
>
> Thanks in advance for your help
>
>
>
>
> _______________________________________________
> logback-user mailing list
> logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
>
More information about the logback-user
mailing list