How to Log Debug Z-Wave Messages to Their Own File in OpenHAB 2?

I’m trying to set up a new system with OpenHAB 2. One of the things I found really useful with OpenHAB 1 was logging Debug-level Z-Wave messages, and putting them in a separate file from the rest of OpenHAB’s logging.

I cannot figure out how to do either of those with OpenHAB 2. (I’m not totally sure how its logging can be reconfigured in general.) Can anyone give me some pointers?

Okay; that helps a lot, but I think I’m still missing something. I’ve got DEBUG Z-Wave output going to a separate file, but it’s also still going to the main openhab.log file, which I don’t want.

Here’s what I added to my /usr/share/openhab2/runtime/karaf/etc/org.ops4j.pax.logging.cfg file: = DEBUG, zwave

log4j.appender.zwave.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n

What do I need to add to prevent Z-Wave logging from clogging up my openhab.log file?

Try adding following statement to the cfg: = false

1 Like

That appears to have taken care of it.


I am aware that this is an old thread, but the way logging should be activated in general for the zwave binding is described here:

EDIT: the setting for logging into separate files as described above still applies, though.

1 Like

Nope, logging has changed about six month ago, the above settings/config changes don’t work anymore.
New examples can be found here:

1 Like

When I saw the above comment by @stefan.hoehn , I went ahead and followed those instructions, and now I am seeing the zwave debug information in my log file (and Log Viewer). Are the instructions you are pointing to intended to create a separate log file (e.g., for Z-wave log information)?

You can find an example in the zwave binding docs