Java – causes the logger to skip the root section in the logback
•
Java
I have several recorder definitions and a root part with several Appenders, as follows:
<logger name="X" level="debug"/> <logger name="Y" level="trace"/> <logger name="Z" level="warn"> <appender-ref ref="ALERTS-SYSLOG" /> </logger> <root level="INFO"> <appender-ref ref="STDOUT"/> <appender-ref ref="FILE"/> <appender-ref ref="BUFFER"/> <appender-ref ref="SYSLOG"/> </root>
What I want to accomplish is that for the recorder named Z, I can only go to alerts-syslog appender, not all defined in the root section Can I configure only on XML files?
Best wishes,
Rui
Solution
Record Z and alerts in the XML file_ Syslog appender explicitly adds an entry and sets the additionality flag to false
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码