logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "流子℡" <41157...@qq.com>
Subject 回复:Difference between <asyncRoot> and -DAsyncLoggerContextSelector
Date Mon, 19 Oct 2015 10:01:43 GMT
if you set -DAsyncLoggerContextSelector ,all the asyncRoot node should be changed to Root,
because needn't.
the difference is  set DAsyncLoggerContextSelector make all the logger async,however. asyncRoot
 only make async inclued in  the node.

------------------ 原始邮件 ------------------
发件人: "Strong Su";<lovelosew@gmail.com>;
发送时间: 2015年10月19日(星期一) 下午5:57
收件人: "Log4J Users List"<log4j-user@logging.apache.org>; 

主题: Difference between <asyncRoot> and -DAsyncLoggerContextSelector

Hello everyone,

I'm not pretty sure about the difference <asyncRoot>
and -DAsyncLoggerContextSelector.
Here is a small slice example of log4j2.xml:

    <logger name="Class_A" level="info" additivity="false"/>
    <root level="info/>

When I set -DAsyncLoggerContextSelector, and both Class_A's logs and other
logs(like Class_B) should be async because the JAVA_OPTS makes all loggers
But if I do not set -DAsyncLoggerContextSelector and change root to
Should logs from Class_A be async or sync?
And what will happen if I remove additivity="false"?

Thank you.
Best Regards,
Dylan Su
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message