Re: [I] %tid always print the same ID if async logging is used (logging-log4j2)
ppkarwasz commented on issue #2258: URL: https://github.com/apache/logging-log4j2/issues/2258#issuecomment-1921256723 No, it is async. When we talk about async loggers, we are actually talking about two **different** implementations: - [`AsyncLogger`](https://logging.apache.org/log4j/2.x/javadoc/log4j-core/org/apache/logging/log4j/core/async/AsyncLogger.html) is what we refer in the docs as [full async logger configuration](https://logging.apache.org/log4j/2.x/manual/async.html#making-all-loggers-asynchronous). The Disruptor starts **before** your configuration is read, so you don't see it in the logs. You need to set `-Dlog4j2.debug` to see the messages. This is the **fastest** (cf. [somehow dated benchmarks](https://logging.apache.org/log4j/2.x/manual/async.html#asynchronous-logging-performance)) of the two, - [`AsyncLoggerConfig`](https://logging.apache.org/log4j/2.x/javadoc/log4j-core/org/apache/logging/log4j/core/async/AsyncLoggerConfig.html) is what we refer in the docs as [mixed async logger configuration](https://logging.apache.org/log4j/2.x/manual/async.html#mixing-synchronous-and-asynchronous-loggers). This is your **initial** configuration. The implementation is much more complex to allow both sync and async logging, hence it is slower and it is easier to find bugs in it. Thanks for confirming that the reported bug does not concern `AsyncLogger`, but only `AsyncLoggerConfig`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] %tid always print the same ID if async logging is used (logging-log4j2)
baldpate commented on issue #2258: URL: https://github.com/apache/logging-log4j2/issues/2258#issuecomment-1921002400 Hi @ppkarwasz, With AsyncLoggerContextSelector the thread ID seems normal. But I cannot find the `Starting AsyncLogger disruptor` log with ``` ``` With the original `AsyncRoot` config i can see `Starting AsyncLoggerConfig disruptor` in log. Does that mean the log is not really async with AsyncLoggerContextSelector ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] %tid always print the same ID if async logging is used (logging-log4j2)
ppkarwasz commented on issue #2258: URL: https://github.com/apache/logging-log4j2/issues/2258#issuecomment-1920768637 @baldpate, Thank you for the report, we'll look into it. Could you also try with a **full** async configuration? This requires you to add: ``` -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector ``` to your JVM parameters and to replace the async logger config with a sync logger config: ```xml ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org