java - Lockback exclude logger from root -
i have few packaged , want separate logging.
<property name="a" value="com.a"/> <property name="b" value="com.b"/> <property name="c" value="com.c"/> <logger name="${a}" level="debug"> <appender-ref ref="file_a"/> </logger> <logger name="${b}" level="debug"> <appender-ref ref="file_b"/> </logger> <logger name="${c}" level="debug"> <appender-ref ref="file_b"/> <!-- yes b --> </logger> <root level="debug"> <-- used other logs -> <appender-ref ref="stdout"/> <appender-ref ref="root_file"/> </root>
so have file_a file_b , root_file; root_file contains info writes root logger , b , c loggers.
how can exclude file_a file_b info root_file ?
or in words how can exclude log data (com.c com.b com.a) root logger ?
set additivity
flag com.a
, com.b
loggers false.
<logger name="${a}" level="debug" additivity="false"> <appender-ref ref="file_a"/> </logger>
now events logged in logger won't propagated parent loggers (root logger in case).
Comments
Post a Comment