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

switch to a logging library from JUL #2389

Closed
jonnyzzz opened this issue Oct 30, 2016 · 1 comment
Closed

switch to a logging library from JUL #2389

jonnyzzz opened this issue Oct 30, 2016 · 1 comment

Comments

@jonnyzzz
Copy link

Currently JUL logger is used. It cannot be controlled well in multi-classloader applications. For example Servlet API containers.

From a web application point of view it's a hacky to configure JUL explicitly from there. The best way to configure logging in that case is to isolate if from container logging (and possible other applications).

Isolation is implemented as easy as including logger libraries into application package. This makes a container to load logger classes along with the app, and thus all logger configuration that is done on application level is not shared to the whole JVM.

This trick does not work well with java.util.logging (JUL). It is a part of JVM, so one cannot load those classes on application-level classloader. So any attempt to configure JUL from application will make this visible to the whole JVM and vice versa.

Switching to any Logging library (which in not a part of JRE) will solve the issue and adds more flexibility for library users. Moreover, it's likely such library is already in classpath of most apps.

For example, slf4j-api is the minimalistic logging library that allows to use any logging backend

@ejona86
Copy link
Member

ejona86 commented Oct 30, 2016

Duplicate of #1577

@ejona86 ejona86 closed this as completed Oct 30, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Sep 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants