After migrating to OpenHab 4 and not changing any log configuration,
I noticed that events.log
gets filled up with log entries although there is no real change to the item:
...
2023-08-22 08:21:38.277 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Hobbyraum_BatteryLevel' updated to 1
2023-08-22 08:21:38.278 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Hobbyraum_BatteryLow' updated to ON
..
2023-08-22 08:22:00.235 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Hobbyraum_BatteryLevel' updated to 1
2023-08-22 08:22:00.236 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Hobbyraum_BatteryLow' updated to ON
...
I hadnβt changed any log levels when migrating and log:get
shows this:
openhab> log:get openhab.event.ItemStateUpdatedEvent
INFO
openhab> log:get
Logger β Level
ββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββ
ROOT β WARN
javax.jmdns β ERROR
javax.mail β ERROR
openhab.event β INFO
openhab.event.AddonEvent β ERROR
openhab.event.ChannelDescriptionChangedEvent β ERROR
openhab.event.InboxUpdatedEvent β ERROR
openhab.event.ItemAddedEvent β ERROR
openhab.event.ItemChannelLinkAddedEvent β ERROR
openhab.event.ItemChannelLinkRemovedEvent β ERROR
openhab.event.ItemRemovedEvent β ERROR
openhab.event.ItemStateEvent β ERROR
openhab.event.RuleAddedEvent β ERROR
openhab.event.RuleRemovedEvent β ERROR
openhab.event.RuleStatusInfoEvent β ERROR
openhab.event.StartlevelEvent β ERROR
openhab.event.ThingAddedEvent β ERROR
openhab.event.ThingRemovedEvent β ERROR
openhab.event.ThingStatusInfoEvent β ERROR
openhab.event.ThingUpdatedEvent β ERROR
org.apache.cxf.jaxrs.sse.SseEventSinkImpl β ERROR
org.apache.cxf.phase.PhaseInterceptorChain β ERROR
org.apache.karaf.jaas.modules.audit β INFO
org.apache.karaf.kar.internal.KarServiceImpl β ERROR
org.apache.karaf.shell.ssh.SshUtils β ERROR
org.apache.karaf.shell.support β OFF
org.apache.sshd β WARN
org.eclipse.lsp4j β OFF
org.jupnp β ERROR
org.openhab β INFO
org.ops4j.pax.url.mvn.internal.AetherBasedResolver β ERROR
org.ops4j.pax.web.pax-web-runtime β OFF
su.litvak.chromecast.api.v2.Channel β ERROR
Is there anything I can do about this and reduce the amount of log entries? NB: Iβd still like to see any real change of value beeing logged!
May I suggest the change that openhab.event.ItemStateUpdatedEvent events should only be logged at the INFO level when the value has changed and on the DEBUG level otherwise.
(Could this have also been the default behavior of OpenHab 3.4?)
Thanks in advance!