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

Jetty logs are not writing when we set the log level to "Warning" remaining log level like Info, Debug, None working as expected #4999

Closed
yuvarajpandu opened this issue Jun 25, 2020 · 4 comments

Comments

@yuvarajpandu
Copy link

Jetty version
jetty-util-9.4.30.v20200611

Java version
1.8

OS type/version
Linux

Description
Jetty logs are not written when we set the log level to "Warning", but able to see logs written when we set Info and Debug level as expected.
Also when we set the jetty log level to "Debug" in one scenario we are getting Warning logs written.

Ex:
Under class org.eclipse.jetty.util.component.AbstractLifecycle.java setFailed(), there is a warning log printed when debug is enabled:

if(LOG.isDebugEnabled())
    LOG.warn((new StringBuilder()).append("FAILED ").append(this).append(": ").append(th).toString(), th);
@janbartel
Copy link
Contributor

You don't say which logging implementation you are using, is it jetty's StdErrLog or something else? If StdErrLog, then the log level to set is "WARN".

As for the AbstractLifeCycle.setFailed() method you mentioned, there are a few cases where the log level to test of DEBUG has explicitly been chosen, because the exception is not something that you want to see on a regular basis, but reveals maybe some extra detailed information you may be interested in if you're digging deeper into the log levels. So I don't necessarily think this particular case is a problem.

@joakime
Copy link
Contributor

joakime commented Jun 25, 2020

This seems like a duplicate of #4996

@yuvarajpandu
Copy link
Author

yuvarajpandu commented Jun 25, 2020

Janbartel, we are using JavaUtilLog logging implementation. Can you please help us to know when Warn log level will write, any scenarios?

@janbartel
Copy link
Contributor

@yuvarajpandu if you've chosen level "WARNING" then you will see very very few log messages at all, as this is one of the highest log levels.

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

No branches or pull requests

3 participants