* Support log4j2 AsyncRoot (AsyncAppender not supported for now), No additional configuration is required. Refer to the demo of log4j2.xml below. For details: [Log4j2 Async Loggers](https://logging.apache.org/log4j/2.x/manual/async.html)
* Support log4j2 AsyncRoot , No additional configuration is required. Refer to the demo of log4j2.xml below. For details: [Log4j2 Async Loggers](https://logging.apache.org/log4j/2.x/manual/async.html)
```xml
<Configuration>
<Appenders>
...
...
@@ -31,5 +31,56 @@
</Loggers>
</Configuration>
```
* Support log4j2 AsyncAppender , No additional configuration is required. Refer to the demo of log4j2.xml below.
For details: [All Loggers Async](https://logging.apache.org/log4j/2.x/manual/async.html#AllAsync)
Log4j-2.9 and higher require disruptor-3.3.4.jar or higher on the classpath. Prior to Log4j-2.9, disruptor-3.0.0.jar or higher was required.
This is simplest to configure and gives the best performance. To make all loggers asynchronous, add the disruptor jar to the classpath and
set the system property `log4j2.contextSelector` to `org.apache.logging.log4j.core.async.AsyncLoggerContextSelector`.
```xml
<Configuration status="WARN">
<Appenders>
<!-- Async Loggers will auto-flush in batches, so switch off immediateFlush. -->
* When you use `-javaagent` to active the sky-walking tracer, log4j2 will output **traceId**, if it existed. If the tracer is inactive, the output will be `TID: N/A`.