I search for a Java logging library and a logging facade for my applications. The facade will be used by my libraries, while the actual implementation will be configured by my standalone applications.

My requirements are (in that priority):

  • The possibility to set the global log level at runtime (programatically)
  • Console output with simple formatting options
  • Lightweight (only required for the facade)

Not required are:

  • More advanced logging features (I really only need a logger.LEVEL("Message", exception))
  • More advanced logging backends (plain text sysout is enough)

My current setup uses Commons logging with Log4J2, and it does not work for me because I can't reliably set the log level at runtime (There is no public API and the internal hack found on StackOverflow does not always work). This is essential because my standalone applications have a "verbose" feature. I also tried configuring the JDK14 backend to be verbose, but that didn't work out either.

If possible, please provide a minimal working configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.