Eiko Wagenknecht
Software Developer, Freelancer & Founder

Increasing Log Level of Binding in openHAB for Debugging

Eiko Wagenknecht

When a binding or part of the openHAB 2 or 3 system isn’t working correctly, increasing the log level can help you gain a more detailed insight into the error.

Table of Contents

Finding the Package

The first step is to determine which package’s log level should be increased. To do this, connect to the openHAB Karaf console and run the command:

list -s

The output is a list of all packages on the system. You’ll need to identify the appropriate one. For a binding, this is usually easily done with the binding’s name, for example:

list -s | grep homematic

The full package name, which you’ll need in the next step, is shown on the right side.

Setting the Log Level

To actually increase the level, use:

log:set <LEVEL> <PACKAGE>

For example:

log:set DEBUG org.openhab.binding.homematic

Valid values for <LEVEL> are (in ascending order):

Resetting the Log Level

When all investigations are complete, the level can be reset with:

log:set DEFAULT <PACKAGE>

Displaying the Current Log Level

All currently set levels are shown by the command:

log:list

Conclusion

I look forward to your comments on whether this article has been helpful. Feel free to write if you have questions or if something remains unclear. Or if you’ve been able to implement exciting further automation projects based on this!

No Comments? No Problem.

This blog doesn't support comments, but your thoughts and questions are always welcome. Reach out through the contact details in the footer below.

Support Me

If you found this page helpful and want to say thanks, I would be very grateful if you could use this link for your next purchase on amazon.com. I get a small commission, and it costs you nothing extra. If you'd like to support me in another way, you can find more options here.