开发者

What does <error-manager><only-once> mean in jboss-logging.xml

开发者 https://www.devze.com 2023-03-18 22:49 出处:网络
does anyone know what <er开发者_C百科ror-manager> <only-once/> </error-manager> mean in jboss-logging.xml?I believe it sets the log4j error handler to be an instance of the OnlyO

does anyone know what

<er开发者_C百科ror-manager>
    <only-once/>
</error-manager>

mean in jboss-logging.xml?


I believe it sets the log4j error handler to be an instance of the OnlyOnceErrorHandler class.

Quoting the relevant JavaDoc page:

The OnlyOnceErrorHandler implements log4j's default error handling policy which consists of emitting a message for the first error in an appender and ignoring all following errors.

The error message is printed on System.err.

This policy aims at protecting an otherwise working application from being flooded with error messages when logging fails.

0

精彩评论

暂无评论...
验证码 换一张
取 消