hawtio — How to change logging levels for hawtio-app?

Tadayoshi Sato
1 min readSep 22, 2017

--

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

--

--

Tadayoshi Sato
Tadayoshi Sato

Written by Tadayoshi Sato

Software engineer at Red Hat, working on Red Hat build of Apache Camel and the open-source projects: Apache Camel and Hawtio.

No responses yet