Log name

Is there a way to create a registrar name using regular expressions or a wild card. The reason I ask this; my application uses many libraries of the third part, which I do not want to add to the same journal. I want a separate order for them. I would like to know if there is a way to create a registrar name by setting a wildcard for the package name, and then all the logs from this package will go to this registrar For example.

<logger name="org.zookeeper.* additivity=false> <appender ref="aaa"/> </logger> 

This should do all the logs from the package name that starts with org.zookeeper. * to go to the above registrar.

Does the registry support backing up this object?

+8
logging logback
source share
1 answer

To register all org.zookeeper subpackages in the "aaa" application, you must omit. * at the end of the registrar definition:

 <logger name="org.zookeeper" additivity=false> <appender ref="aaa"/> </logger> 
+10
source share

All Articles