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

Reply via email to