You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: