hawtio — How to change logging levels for hawtio-app?
By default hawtio-app.jar
runs with INFO
logging level, but sometimes you may want to run it with DEBUG
logging level to see what’s really happening under the hood.
In fact, hawtio-app.jar
runs with an embedded Jetty server that uses theorg.eclipse.jetty.util.log.Slf4Log
logging implementation and slf4j-simple
, which enables you to configure the logging levels via org.slf4j.simpleLogger.xxxxx
system properties.
Let’s change the default logging level toDEBUG
. To do so, you can use -Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG
:
$ java -Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG -jar hawtio-app-1.5.4.jar
In turn, if you only want to turn on DEBUG
logging for a specific package or class (e.g. com.example.app
), you can use -Dorg.slf4j.simpleLogger.log.<namespace>=DEBUG
:
$ java -Dorg.slf4j.simpleLogger.log.com.example.app=DEBUG -jar hawtio-app-1.5.4.jar