logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Strong Su <lovelo...@gmail.com>
Subject Difference between <asyncRoot> and -DAsyncLoggerContextSelector
Date Mon, 19 Oct 2015 09:57:22 GMT
Hello everyone,

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

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

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
async..
But if I do not set -DAsyncLoggerContextSelector and change root to
asyncroot.
Should logs from Class_A be async or sync?
And what will happen if I remove additivity="false"?

Thank you.
Best Regards,
Dylan Su

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message