google/flogger

Log4j2 Backend performs a toString for the Logger name

scottsue opened this issue · 0 comments

When using the log4j2 backend, the logger name that is used performs a toString(). Looking at the underlying implementation of this, the logger name appends the log level and hexcode of the instance. Generating a log line like:

2021-04-28 11:18:06.154 INFO [main] com.celertech.analytics.api.AnalyticsProducerImpl:INFO in 18b4aac2 - Starting analytics producer

Therefore the level is always printed along with the logger name, when it should be separate, allowing for the pattern to dictate which elements of the log event are to be printed. The log line should instead look like

2021-04-28 11:18:06.154 INFO [main] com.celertech.analytics.api.AnalyticsProducerImpl - Starting analytics producer