ppkarwasz commented on issue #3240:
URL: 
https://github.com/apache/logging-log4j2/issues/3240#issuecomment-2501263468

   @bfreitastgtg,
   
   Thanks for reporting it. Log4j loads all annotated implementations of 
`StrLookup` in the static initialization of `LoggerContext`. When you class 
requests the logger, `LoggerContext` is not completely initialized. You will 
get all sorts of NPEs in this case.
   
   There is a special logger (see [Status 
Logger](https://logging.apache.org/log4j/2.x/manual/status-logger.html)) that 
you can use in Log4j Plugins, but you **should** not use loggers obtained from 
`LogManager` or some foreign logging API bridged to Log4j API.


-- 
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

Reply via email to