Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Ghilteras opened this issue Mar 1, 2019 · 7 comments
Assignees
Labels

Comments

@Ghilteras
Copy link

Ghilteras commented Mar 1, 2019

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.

@jessewgibbs
Copy link
Contributor

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

@rokob
Copy link
Contributor

rokob commented Mar 4, 2019

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

@rokob
Copy link
Contributor

rokob commented Mar 4, 2019

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
Copy link
Contributor

rokob commented Mar 7, 2019

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

@brianr
Copy link
Member

brianr commented Mar 11, 2019

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

@Ghilteras
Copy link
Author

Ghilteras commented Mar 21, 2019

@brianr It looks like it's just a warning

@madisparn
Copy link

madisparn commented Jul 28, 2023

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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants