Is some path to write log messages only to the 'child' logger, avoiding root logger? The root logger is using by other components, so there is no ability to decrease it's level or disable appender. thanks
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Please use Log4j additivity.
Set the additivity property of a Log4j logger to false and then the log messages which are coming to that logger will not be propagated to parent loggers.
Log4j configuration file:
With the above configuration, the log messages from the com.demo.moduleone will go to the moduleOneAppender only and the rest of the log messages will go to the rootFileAppender.