Lately I noticed that changes to the log4j2.xml file are not automatically detected anymore. I’m not 100% sure, but I think this is the case since I updated to OpenHab 5.
I’m running OpenHab in a Docker container, but the changes were detected before the update.
The monitor interval is set to 10 seconds in the log4j2.xml: <Configuration monitorInterval="10">
I also tested if the file system events are working inside the container by using the command inotifywait -mr /openhab/userdata/etc/log4j2.xml and I could see the events after changing the file.
Is this a known issue or what could have changed that this is not working anymore?
Edit: In the Karaf console I can see that the log level changes shorty after changing the xml, but I cannot see logs from the lower log level in the log file.
rlkoshak
(Rich Koshak)
December 2, 2025, 2:08pm
2
This is not a know issue and is the first time this behavior has been reported. However, if you can see anything change after changing the xml file the problem isn’t that the file isn’t being monitored and read. There is something else wrong. Perhaps a syntax error, misconfiguration, or file system problem.
I’ve just tested if the logs show up in the log viewer in the UI after I change the log level in the xml, but they don’t even appear there.
I also tested what happens if I change the log level in the UI and in this case it works immediately. When I change the log level in the file I can also see the new level in the UI, but for some reason it is not applied correctly.
Could this be a problem with my custom log4j2.xml? I change quite a lot to have a separate file for different bindings. Here is my config:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><Configuration monitorInterval="10">
<Appenders>
<!-- Console appender not used by default (see Root logger AppenderRefs) -->
<Console name="STDOUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
</Console>
<!-- Rolling file appender -->
<RollingFile fileName="${sys:openhab.logdir}/openhab.log" filePattern="${sys:openhab.logdir}/openhab.log.%i.gz" name="LOGFILE">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- Event log appender -->
<RollingRandomAccessFile fileName="${sys:openhab.logdir}/events.log" filePattern="${sys:openhab.logdir}/events.log.%i.gz" name="EVENT">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingRandomAccessFile>
<!-- Audit file appender -->
<RollingRandomAccessFile fileName="${sys:openhab.logdir}/audit.log" filePattern="${sys:openhab.logdir}/audit.log.%i.gz" name="AUDIT">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="8 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingRandomAccessFile>
<!-- OSGi appender -->
<PaxOsgi filter="*" name="OSGI"/>
<!-- HTTP Binding appender -->
<RollingFile fileName="${sys:openhab.logdir}/http.log" filePattern="${sys:openhab.logdir}/http.log.%i" name="HTTP">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- Transform appender -->
<RollingFile fileName="${sys:openhab.logdir}/transform.log" filePattern="${sys:openhab.logdir}/transform.log.%i" name="TRANSFORM">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- Persistence appender -->
<RollingFile fileName="${sys:openhab.logdir}/persistence.log" filePattern="${sys:openhab.logdir}/persistence.log.%i" name="PERSISTENCE">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- Rules appender -->
<RollingFile fileName="${sys:openhab.logdir}/rules.log" filePattern="${sys:openhab.logdir}/rules.log.%i" name="RULES">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- Python Rules appender -->
<RollingFile fileName="${sys:openhab.logdir}/rules_python.log" filePattern="${sys:openhab.logdir}/rules_python.log.%i" name="RULES_PYTHON">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
</RollingFile>
<!-- InfluxDB appender -->
<RollingFile fileName="${sys:openhab.logdir}/influxdb.log" filePattern="${sys:openhab.logdir}/influxdb.log.%i" name="INFLUXDB">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- HARMONY appender -->
<RollingFile fileName="${sys:openhab.logdir}/harmony.log" filePattern="${sys:openhab.logdir}/harmony.log.%i" name="HARMONY">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- NETWORK appender -->
<RollingFile fileName="${sys:openhab.logdir}/network.log" filePattern="${sys:openhab.logdir}/network.log.%i" name="NETWORK">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- EXEC appender -->
<RollingFile fileName="${sys:openhab.logdir}/exec.log" filePattern="${sys:openhab.logdir}/exec.log.%i" name="EXEC">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- HUEEMULATION appender -->
<RollingFile fileName="${sys:openhab.logdir}/hueemulation.log" filePattern="${sys:openhab.logdir}/hueemulation.log.%i" name="HUEEMULATION">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- ONKYO appender -->
<RollingFile fileName="${sys:openhab.logdir}/onkyo.log" filePattern="${sys:openhab.logdir}/onkyo.log.%i" name="ONKYO">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- KODI appender -->
<RollingFile fileName="${sys:openhab.logdir}/kodi.log" filePattern="${sys:openhab.logdir}/kodi.log.%i" name="KODI">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- ZWAVE appender -->
<RollingFile fileName="${sys:openhab.logdir}/zwave.log" filePattern="${sys:openhab.logdir}/zwave.log.%i" name="ZWAVE">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- MQTT appender -->
<RollingFile fileName="${sys:openhab.logdir}/mqtt.log" filePattern="${sys:openhab.logdir}/mqtt.log.%i" name="MQTT">
<RegexFilter onMatch="DENY" onMismatch="NEUTRAL" regex=".*(Applying template).*"/> <!-- Filter for https://github.com/openhab/openhab-addons/issues/18219 -->
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<RollingFile fileName="${sys:openhab.logdir}/mqtt.io.log" filePattern="${sys:openhab.logdir}/mqtt.log.%i" name="MQTTIO">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<RollingFile fileName="${sys:openhab.logdir}/mqtt.hivemq.log" filePattern="${sys:openhab.logdir}/mqtt.log.%i" name="MQTTHIVEMQ">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- Script appender -->
<RollingFile fileName="${sys:openhab.logdir}/script.log" filePattern="${sys:openhab.logdir}/script.log.%i" name="SCRIPT">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- EspHome device appender -->
<RollingFile fileName="${sys:openhab.logdir}/esphome.log" filePattern="${sys:openhab.logdir}/esphome.log.%i" name="ESPHOME">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- Wled device appender -->
<RollingFile fileName="${sys:openhab.logdir}/wled.log" filePattern="${sys:openhab.logdir}/wled.log.%i" name="WLED">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- Matter Bridge appender -->
<RollingFile fileName="${sys:openhab.logdir}/matterbridge.log" filePattern="${sys:openhab.logdir}/matterbridge.log.%i" name="MATTERBRIDGE">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- Matter Controller appender -->
<RollingFile fileName="${sys:openhab.logdir}/mattercontroller.log" filePattern="${sys:openhab.logdir}/mattercontroller.log.%i" name="MATTERCONTROLLER">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
<!-- Matter-JS appender -->
<RollingFile fileName="${sys:openhab.logdir}/matterjs.log" filePattern="${sys:openhab.logdir}/matterjs.log.%i" name="MATTERJS">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="16 MB"/>
</Policies>
<DefaultRolloverStrategy max="7"/>
</RollingFile>
</Appenders>
<Loggers>
<!-- Root logger configuration -->
<Root level="WARN">
<AppenderRef ref="LOGFILE"/>
<AppenderRef ref="OSGI"/>
</Root>
<!-- Karaf Shell logger -->
<Logger level="OFF" name="org.apache.karaf.shell.support">
<AppenderRef ref="STDOUT"/>
</Logger>
<!-- Security audit logger -->
<Logger additivity="false" level="INFO" name="org.apache.karaf.jaas.modules.audit">
<AppenderRef ref="AUDIT"/>
</Logger>
<!-- openHAB specific logger configuration -->
<Logger level="INFO" name="org.openhab"/>
<Logger level="ERROR" name="openhab.event.ItemStateEvent"/>
<Logger level="ERROR" name="openhab.event.ItemStateUpdatedEvent"/>
<Logger level="ERROR" name="openhab.event.GroupStateUpdatedEvent"/>
<Logger level="ERROR" name="openhab.event.ItemAddedEvent"/>
<Logger level="ERROR" name="openhab.event.ItemRemovedEvent"/>
<Logger level="ERROR" name="openhab.event.ItemChannelLinkAddedEvent"/>
<Logger level="ERROR" name="openhab.event.ItemChannelLinkRemovedEvent"/>
<Logger level="ERROR" name="openhab.event.ChannelDescriptionChangedEvent"/>
<Logger level="ERROR" name="openhab.event.ThingStatusInfoEvent"/>
<Logger level="ERROR" name="openhab.event.ThingAddedEvent"/>
<Logger level="ERROR" name="openhab.event.ThingUpdatedEvent"/>
<Logger level="ERROR" name="openhab.event.ThingRemovedEvent"/>
<Logger level="ERROR" name="openhab.event.InboxUpdatedEvent"/>
<Logger level="ERROR" name="openhab.event.RuleStatusInfoEvent"/>
<Logger level="ERROR" name="openhab.event.RuleAddedEvent"/>
<Logger level="ERROR" name="openhab.event.RuleRemovedEvent"/>
<Logger level="ERROR" name="openhab.event.StartlevelEvent"/>
<Logger level="ERROR" name="openhab.event.AddonEvent"/>
<Logger additivity="false" level="ERROR" name="openhab.event">
<AppenderRef ref="EVENT"/>
<AppenderRef ref="OSGI"/>
</Logger>
<Logger level="ERROR" name="javax.jmdns"/>
<Logger level="ERROR" name="org.jupnp"/>
<!-- This suppresses all Maven download issues from the log when doing feature installations -->
<!-- as we are logging errors ourselves in a nicer way anyhow. -->
<Logger level="ERROR" name="org.ops4j.pax.url.mvn.internal.AetherBasedResolver"/>
<!-- Filters known issues of pax-web (issue link to be added here). -->
<!-- Can be removed once the issues are resolved in an upcoming version. -->
<Logger level="OFF" name="org.ops4j.pax.web.pax-web-runtime"/>
<!-- Filters known issues of lsp4j, see -->
<!-- https://github.com/eclipse/smarthome/issues/4639 -->
<!-- https://github.com/eclipse/smarthome/issues/4629 -->
<!-- https://github.com/eclipse/smarthome/issues/4643 -->
<!-- Can be removed once the issues are resolved in an upcoming version. -->
<Logger level="OFF" name="org.eclipse.lsp4j"/>
<!-- Filters warnings for events that could not be delivered to a disconnected client. -->
<Logger level="ERROR" name="org.apache.cxf.jaxrs.sse.SseEventSinkImpl"/>
<!-- Filters warnings from broken connections during startup -->
<!-- https://github.com/openhab/openhab-core/issues/2998 -->
<Logger level="ERROR" name="org.apache.cxf.phase.PhaseInterceptorChain"/>
<!-- Filters known issues of KarServiceImpl, see -->
<!-- https://github.com/openhab/openhab-distro/issues/519#issuecomment-351944506 -->
<!-- Can be removed once the issues are resolved in an upcoming version. -->
<Logger level="ERROR" name="org.apache.karaf.kar.internal.KarServiceImpl"/>
<!-- Filters warnings about unavailable ciphers when JCE is not installed, see -->
<!-- https://github.com/openhab/openhab-distro/issues/999 -->
<Logger level="ERROR" name="org.apache.karaf.shell.ssh.SshUtils"/>
<!-- Filters known issues of javax.mail, see -->
<!-- https://github.com/openhab/openhab-addons/issues/5530 -->
<Logger level="ERROR" name="javax.mail"/>
<!-- Filters disconnection warnings of the ChromeCast Java API, see -->
<!-- https://github.com/openhab/openhab-addons/issues/3770 -->
<Logger level="ERROR" name="su.litvak.chromecast.api.v2.Channel"/>
<!-- Added by Karaf to prevent debug logging loops, see -->
<!-- https://issues.apache.org/jira/browse/KARAF-5559 -->
<Logger level="WARN" name="org.apache.sshd"/>
<!-- HTTP Binding -->
<Logger additivity="false" level="ERROR" name="org.openhab.binding.http">
<AppenderRef ref="HTTP"/>
</Logger>
<!-- Transform -->
<Logger additivity="false" level="ERROR" name="org.openhab.transform">
<AppenderRef ref="TRANSFORM"/>
</Logger>
<!-- JDBC Persistence -->
<Logger additivity="false" level="ERROR" name="org.openhab.persistence.jdbc">
<AppenderRef ref="PERSISTENCE"/>
</Logger>
<!-- Rules -->
<Logger additivity="false" level="ERROR" name="org.openhab.core.automation.internal.RuleEngineImpl">
<AppenderRef ref="RULES"/>
</Logger>
<Logger additivity="false" level="ERROR" name="org.openhab.core.automation.module.script.internal.handler">
<AppenderRef ref="RULES"/>
</Logger>
<Logger additivity="false" level="ERROR" name="org.openhab.core.model.script">
<AppenderRef ref="RULES"/>
</Logger>
<!-- Rules Python -->
<Logger additivity="false" level="ERROR" name="org.openhab.automation.pythonscripting">
<AppenderRef ref="RULES_PYTHON"/>
</Logger>
<!-- InfluxDB -->
<Logger additivity="false" level="ERROR" name="org.openhab.persistence.influxdb">
<AppenderRef ref="INFLUXDB"/>
</Logger>
<Logger additivity="false" level="ERROR" name="org.influxdb.impl">
<AppenderRef ref="INFLUXDB"/>
</Logger>
<Logger additivity="false" level="ERROR" name="com.influxdb.client">
<AppenderRef ref="INFLUXDB"/>
</Logger>
<Logger additivity="false" level="ERROR" name="com.influxdb.internal">
<AppenderRef ref="INFLUXDB"/>
</Logger>
<!-- HARMONY -->
<Logger additivity="false" level="ERROR" name="org.openhab.binding.harmonyhub">
<AppenderRef ref="HARMONY"/>
</Logger>
<Logger additivity="false" level="ERROR" name="net.whistlingfish.harmony">
<AppenderRef ref="HARMONY"/>
</Logger>
<Logger additivity="false" level="ERROR" name="org.jivesoftware.smack">
<AppenderRef ref="HARMONY"/>
</Logger>
<!-- NETWORK -->
<Logger additivity="false" level="ERROR" name="org.openhab.binding.network">
<AppenderRef ref="NETWORK"/>
</Logger>
<!-- EXEC -->
<Logger additivity="false" level="ERROR" name="org.openhab.binding.exec">
<AppenderRef ref="EXEC"/>
</Logger>
<!-- HUEEMULATION -->
<Logger additivity="false" level="ERROR" name="org.openhab.io.hueemulation">
<AppenderRef ref="HUEEMULATION"/>
</Logger>
<Logger additivity="false" level="ERROR" name="org.apache.cxf">
<AppenderRef ref="HUEEMULATION"/>
</Logger>
<!-- ONKYO -->
<Logger additivity="false" level="ERROR" name="org.openhab.binding.onkyo">
<AppenderRef ref="ONKYO"/>
</Logger>
<!-- KODI -->
<Logger additivity="false" level="ERROR" name="org.openhab.binding.kodi">
<AppenderRef ref="KODI"/>
</Logger>
<!-- ZWAVE -->
<Logger additivity="false" level="TRACE" name="org.openhab.binding.zwave">
<AppenderRef ref="ZWAVE"/>
</Logger>
<!-- MQTT -->
<Logger additivity="false" level="INFO" name="org.openhab.binding.mqtt">
<AppenderRef ref="MQTT"/>
</Logger>
<Logger additivity="false" level="ERROR" name="org.openhab.binding.mqtt.generic.ChannelStateTransformation">
<AppenderRef ref="MQTT"/>
</Logger>
<Logger additivity="false" level="ERROR" name="org.openhab.binding.mqtt.homeassistant.internal.DiscoverComponents">
<AppenderRef ref="MQTT"/>
</Logger>
<Logger additivity="false" level="WARN" name="org.mqttbee.internal.mqtt">
<AppenderRef ref="MQTT"/>
</Logger>
<Logger additivity="false" level="WARN" name="org.openhab.core.io.transport.mqtt">
<AppenderRef ref="MQTTIO"/>
</Logger>
<Logger additivity="false" level="WARN" name="com.hivemq.client">
<AppenderRef ref="MQTTHIVEMQ"/>
</Logger>
<!-- Script -->
<Logger additivity="false" level="WARN" name="org.openhab.core.model.script">
<AppenderRef ref="SCRIPT"/>
</Logger>
<Logger additivity="false" level="WARN" name="org.openhab.automation.script">
<AppenderRef ref="SCRIPT"/>
</Logger>
<!-- EspHome device -->
<Logger additivity="false" level="INFO" name="ESPHOMEDEVICE">
<AppenderRef ref="ESPHOME"/>
</Logger>
<!-- Wled device -->
<Logger additivity="false" level="ERROR" name="org.openhab.binding.wled">
<AppenderRef ref="WLED"/>
</Logger>
<!-- Matter Bridge -->
<Logger additivity="false" level="ERROR" name="org.openhab.binding.matter.internal.bridge">
<AppenderRef ref="MATTERBRIDGE"/>
</Logger>
<!-- Matter Controller -->
<Logger additivity="false" level="ERROR" name="org.openhab.binding.matter.internal.controller">
<AppenderRef ref="MATTERCONTROLLER"/>
</Logger>
<!-- Matter-JS -->
<Logger additivity="false" level="ERROR" name="org.openhab.binding.matter.internal.client.MatterWebsocketService">
<AppenderRef ref="MATTERJS"/>
</Logger>
</Loggers>
</Configuration>
sihui
(SiHui)
December 2, 2025, 4:25pm
4
TheNetStriker:
Here is my config
With the format you choose it is almost unreadable
I think the name here is wrong …
<!-- EspHome device --> <Logger additivity="false" level="INFO" name="ESPHOMEDEVICE"> <AppenderRef ref="ESPHOME"/> </Logger>
Sorry, I fixed the XML format now.
Thanks for the hint regarding the esphome logger. I’m using the inofficial native api community bundle. This one had this weird namespace for some time, but I guess the developer has now changed it to “no.seime.openhab.binding.esphome”.
But the problem that the lower log levels are not logged after a change to the xml still exists. Also if I add a new file it is only created after a restart of OpenHAB.
sihui
(SiHui)
December 2, 2025, 4:44pm
6
I would test the default log4j2.xml and it that works, add your custom entries one by one … until it breaks again.
1 Like
I’ve just tested the default xml, but the changes are still not applied. Here are the steps how I tested this.
Shut down the OpenHAB Docker container.
Replaced my custom xml with the default file.
Changed owner and group of the xml to openhab.
Started OpenHAB back up again.
Now item change events are logged to the events.log.
Changed the openhab.event logger to ERROR level.
Events are still logged to the events.log.
So I think we can rule out that this is a problem of my custom xml. Do you have any other idea?
sihui
(SiHui)
December 2, 2025, 5:17pm
8
No, sorry.
I have no experience with Docker … (Proxmox user).
I can only say it works fine with 5.1.0.M3 (also using some custom configuration)
I also just tested this by setting up a fresh install of the OpenHab 5.1 Docker snapshot image on my local Windows machine, but the problem also exists there.
Is there maybe some way to see what’s going on behind the scenes with log4j? Maybe in the Karaf console?
Edit: I also just tested this with a fresh install of OpenHab 4.3.8 and there it works when I change the log level in the file. So there has to be something that changed with OpenHab 5.
rlkoshak
(Rich Koshak)
December 2, 2025, 6:03pm
10
But that’s the thing. There isn’t. There is no PR in OH that changed anything related to logging for 5.0 beyond the updates to the upstream versions of the various libraries. I suppose something may have changed upstream but we’d need a lot more information to file an issue up there.
I’m running 5.1 M3 in Docker and I’m not seeing this behavior. I tested by changing the lobbing level for RuleStatusInfoEvent to INFO.
@rlkoshak I just checked in the openhab-core repository and the pax.logging.version was changed from 2.2.7 to 2.3.0 in OpenHAB 5: openhab-core/bom/runtime/pom.xml at main · openhab/openhab-core · GitHub
Also regarding the Docker container there was a change from Debian 12 to 13. I’m still running Debian 12 on my host. (Raspberry Pi 5)
Are you already running Debian 13 on you Docker host? Then this could maybe be some incompatibility between my host os and the docker container image. I could try to build my own OpenHAB 5 image with Debian 12 to test this.
rlkoshak
(Rich Koshak)
December 2, 2025, 6:17pm
12
The whole point of running containers is that doesn’t matter. But no, I’m not running Debian anything on my host, I’m running Ubuntu 24.04. But except for stuff that is explicitly shared into the container, the only thing the container shares with the host is the kernel.
@rlkoshak I just tested this by building my own container with OpenHAB 5 and Debian 12, but the problem still exists.
But I just found out that after I open a Karaf shell and execute log:tail (after changing the xml) the changes from the xml are working. Maybe this could be some weird timing issue and the log:tail commands refreshes something?
rlkoshak
(Rich Koshak)
December 2, 2025, 6:58pm
14
Perhaps. That too is all stuff upstream from the OH project. That’d be handled by the Karaf project. Note that Karaf uses a different appender from the files.