ppkarwasz commented on PR #3263: URL: https://github.com/apache/logging-log4j2/pull/3263#issuecomment-2701347439
Hi @sundaybluesky, > Can you please consider change back AsyncLogger constructor package-private access back to public? Sure, please open a [new feature request](https://github.com/apache/logging-log4j2/issues/new/choose). In the new feature request, can you explain how are you using `AsyncLogger`. It is entirely possible that there are already public APIs that allow you to do what you are doing. For example [`AsyncLoggerContext.newLogger()`](https://logging.apache.org/log4j/2.x/javadoc/log4j-core/org/apache/logging/log4j/core/async/AsyncLoggerContext.html#newInstance(org.apache.logging.log4j.core.LoggerContext,java.lang.String,org.apache.logging.log4j.message.MessageFactory)) allows you to create a new `AsyncLogger` without any reflection. > This code was working for more than 7 years and blocked in 2.24.3 with this PR code change. That is the problem with using reflection to access private methods or classes like `AsyncLoggerDisruptor`: the class or method can disappear without notice. **Note**: As far as I understand you called the constructor of `AsyncLogger` through reflection. You can still do it, but you need to make it accessible first. -- 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