As a user of OpenHAB 3, I’ve been diving into the world of logging and wanted to share my experiences and findings. Logging is crucial for troubleshooting and monitoring, but I’ve encountered some challenges along the way.
Initially, I explored the documentation and found references to SLF4J, which I understood to be outdated as it only supports Log4j1. However, OH3 seems to have moved on to Log4j2, as indicated by the presence of a log4j2.xml config file. This was exciting because Log4j2 offers more advanced features, including the ZeroMQ appender, which I wanted to utilize for real-time logging across multiple systems.
After setting up the ZeroMQ appender and adding the necessary JAR files, I noticed an issue. It turned out that the OSGi layer in OH3, specifically pax-logging, doesn’t fully support all the advanced appenders that Log4j2 offers. This was a bit of a setback because pax-logging seems to lag behind Log4j2’s developments, especially regarding newer features introduced in recent years.
I wondered if there’s a way to bypass this OSGi layer and use Log4j2 directly. If anyone has insights or workaround solutions, I’d love to hear about them! My goal is to find effective log appenders that can enhance my logging setup without running into compatibility issues.
This journey has been enlightening, and I hope sharing my experiences can help others who might be facing similar challenges. If anyone has successfully integrated advanced logging solutions in OH3, please share your tips and tricks! Cheers to learning and improving our smart home setups together. ![]()