rollbar-java icon indicating copy to clipboard operation
rollbar-java copied to clipboard

SLF4J loggers will not work because they were created during the default configuration phase of the underlying logging system.

Open Ghilteras opened this issue 5 years ago • 7 comments

Hi, I'm getting this errors during my mvn test

The following loggers will not work becasue they were created
SLF4J: during the default configuration phase of the underlying logging system.
SLF4J: See also http://www.slf4j.org/codes.html#substituteLogger
SLF4J: com.rollbar.notifier.sender.SyncSender
SLF4J: com.rollbar.notifier.util.ObjectsUtils
SLF4J: com.rollbar.notifier.Rollbar

This happens with rollbar-java 1.4.0 and lombok 1.18.6

Not sure what's needed to do here, any hints? The substituteLogger link above does not say anything interesting about it.

Ghilteras avatar Mar 01 '19 01:03 Ghilteras

@rokob can you take a look at this when you get a chance?

jessewgibbs avatar Mar 04 '19 17:03 jessewgibbs

Yeah I am looking right now, I'm not sure if this is a problem other than being noise

rokob avatar Mar 04 '19 17:03 rokob

I think this is saying that Rollbar uses SLF4J for its own logging and therefore an appender which calls into Rollbar creates a bit of recursion so the logging inside Rollbar won't work during the SLF4J setup phase. Afterwards things will work just fine. But I'm not sure why this doesn't happen in every project rather than just here in tests.

rokob avatar Mar 04 '19 17:03 rokob

Is this just a warning or does it actually prevent code from compiling and running?

rokob avatar Mar 07 '19 05:03 rokob

@Ghilteras, is this preventing code from compiling/running or is it just a warning?

brianr avatar Mar 11 '19 19:03 brianr

@brianr It looks like it's just a warning

Ghilteras avatar Mar 21 '19 00:03 Ghilteras

The rollbar logger early initialization WARN causes a lot of log messages to be printed by logback.

10:08:09,282 |-INFO in ch.qos.logback.classic.model.processor.RootLoggerModelHandler - Setting level of ROOT logger to WARN
10:08:09,281 |-WARN in Logger[com.rollbar.notifier.Rollbar] - No appenders present in context [default] for logger [com.rollbar.notifier.Rollbar].
10:08:09,008 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [com.rollbar.logback.RollbarAppender]
10:08:09,008 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [ROLLBAR]

madisparn avatar Jul 28 '23 10:07 madisparn