openHAB - Filtering event logs

Filtering works correctly but i have an error during startup OH (2.5.8) in docker:

org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : RegexFilter contains an invalid element or attribute "onMismatch" Ignored FQCN: org.apache.logging.log4j.spi.AbstractLogger

My filters at the end of the org.ops4j.pax.logging.cfg file :

############ CUSTOM FILTERS START HERE #################
# event log filter
log4j2.appender.event.filter.1.type = Filters

log4j2.appender.event.filter.1.a.type = RegexFilter
log4j2.appender.event.filter.1.a.regex = .*Dom_.* changed from .* to .*
log4j2.appender.event.filter.1.a.onMatch = DENY
log4j2.appender.event.filter.1.a.onMismatch = NEUTRAL

log4j2.appender.event.filter.1.b.type = RegexFilter
log4j2.appender.event.filter.1.b.regex = .*PV_.* changed from .* to .*
log4j2.appender.event.filter.1.b.onMatch = DENY
log4j2.appender.event.filter.1.b.onMismatch = NEUTRAL

################# END OF FILTERS ######################

How should “onMismatch” filter look like to get rid of this error ?

I am having a challenge filtering out content from my openhab.log

I’m using the TCP binding to talk to my home lighting system. The lighting system is very chatty and sends out information which openhab tries to interpret which leaves me with lots of warning messages that look like this:

2020-10-30 15:17:37.206 [WARN ] [rm.AbstractFileTransformationService] - Could not transform 'SW 1 89 4 0' with the file 'butler.map' : Target value not found in map for 'SW 1 89 4 0
'

I’m using the following in my org.ops4j.pax.logging.cfg file, which is posted right after the # Rolling file appender

# filter out Vantage Transforms
log4j2.appender.out.filter.vantage.type = Filters

log4j2.appender.out.filter.vantage.type = RegexFilter
log4j2.appender.out.filter.vantage.regex = .*(Could not transform).*
log4j2.appender.out.filter.vantage.onMatch = DENY
log4j2.appender.out.filter.vantage.onMisMatch = ACCEPT

This is having no effect and I still receive lots of messages in the log…

Any idea on what I am doing wrong?

It’s been awhile since I’ve looked at filters, but I think the first line is only necessary if you have multiple subfilters. So in your case you can delete it and just have the last four lines.

I’m not sure if that’s the solution, but it’s the first thing that jumps out at me.

Alternatively, would it be better to just change the log levels for this particular binding to not record warnings?

EDIT: I just realized that you’re doing this for the openhab.log file. I’m only filtering for events.log. However, I have an entry to filter Chromecast warnings out of openhab.log, based on these instructions. You should be able to do the same for the TCP binding.

I’ve tried it with and without the first line without success.

If I change the TCP binding to a level that doesn’t show Warnings…I might need to remember that when I need to debug…I always seem to forget that until I’ve hit my head on the desk a few times remembering I had turned logging off or set the level too high! :stuck_out_tongue:

I think I misspoke…

Think I would need to ratchet down the logging on the Transformation Service not the TCP binding

[rm.AbstractFileTransformationService]

I edited my earlier comment, but just to make sure you see it…

I just realized that you’re doing this for the openhab.log file. I’m only filtering for events.log. However, I have an entry to filter Chromecast warnings out of openhab.log, based on these instructions. You should be able to do the same for the TCP binding.

I can’t remember when, maybe in the OH 2.4 release timeframe, the Map transformation added a feature where you could define a default if nothing else in the file matches. Perhaps if you set a default to something like “null” or “na” or the like you can eliminate these log statements entirely. I don’t know enough details with the given information to know if that would have unexpected impacts.

As an update to this thread and my challenge…

The additions to the logging file I made here

Seemed to have worked! What’s strange is that the change seemed to take some time to take. I would check to see if the updates to the logging file would work right after I saved the updated file and they would not.

But I made the changes listed above, and did got interrupted and did not immediately check the log files. I checked the files a day later to look at trying which @rlkoshak suggested and low and behold my openhab.log file was being filtered.

I don’t know how often the logging configuration gets re-indexed or imported, but it sure does not seem to be as quick as an edit to an item or sitemap file.

Squid

1 Like

Interesting. Changes to events.log seem almost instant to me, but perhaps that’s different with openhab.log? Thanks for the update!

Hey there!

I hope anyone can give me a hint how to solve this issue:
On my OH2.5.10 i have a binding (lgESSInverter), where its state changes are regularily logged in the syslog and daemon.log files. The consequence is, that these files run full and so also my ZRAM. For example in the syslog file it looks like this:

(…)
Dec 13 23:45:38 openHABV2 karaf[1356]: home#evChargerActivate : “off” : ONOFF
Dec 13 23:45:38 openHABV2 karaf[1356]: home#evChargerPower : “0” : WATT
(…)

Seems to me, that there is maybe also any link to karaf?
Does anyone have an idee how to stop/filter logging of item state changes to karaf(?) / syslog / daemon.log?

BTW: I don’t see these state changes in the openhab.log file. (I changed the log config file for this succesfully.)

Thank you!
Best regards,
Berti

I’m just a novice, but I would look in openhab2-userdata/etc/org.apache.karaf.log.cfg and use the above guidance.
or…
There is also the idea on the openhab-cli console
log:set OFF org.openhab.binding.name

Can’t help much more

Bob

I need some help;

I am on OH 2.5.12 - running on OpenHabian.

I have tried to follow the guidance in this thread to filter out a state change on some of my items which are very long, comes every 1 minute and basically fills my log with stuff I dont need. I could leave it in there, but it makes scrolling through the log for other issues cumbersome, so I would rather not have them.

These are the event.log lines I would like to filter out (real example) - regarding the item “aduroh2_opdata_Output_str”:

2021-05-12 12:46:00.628 [vent.ItemStateChangedEvent] - aduroh2_opdata_Output_str changed from operating_data/time=12/05-21 12:45:03
operating_data/boiler_temp=14.4
operating_data/smoke_temp=13.3
operating_data/return_temp=999.9
operating_data/dhw_temp=13.2
operating_data/external_temp=0.0
operating_data/t6_temp=0.0
operating_data/t7_temp=0.0
operating_data/distance=999
operating_data/photo_level=100
operating_data/shaft_temp=14.4
operating_data/milli_ampere=30
operating_data/oxygen=20.0
operating_data/flow1=0
operating_data/flow2=0
operating_data/flow3=0
operating_data/flow4=0
operating_data/power_pct=0
operating_data/power_kw=0.0
operating_data/oxygen_ref=0.0
operating_data/boiler_ref=21.0
operating_data/mean_out_temp=0.0
operating_data/dhw_ref=0.0
operating_data/forward_ref=0.0
operating_data/sun2_temp=0.0
operating_data/sun_dhw_temp=0.0
operating_data/sun_surplus_temp=0.0
operating_data/pressure=0.00
operating_data/air_flow=0
operating_data/sun_temp=0.0
operating_data/house_valve_state=1
operating_data/chill_out=0.0
operating_data/sun_pumpspeed=0
operating_data/sun_power_kw=0.0
operating_data/cloud_level=0
operating_data/forward_temp=0.0
operating_data/back_pressure=0
operating_data/t1_temp=0
operating_data/air_quality=0
operating_data/feed_low=1500
operating_data/feed_medium=210
operating_data/feed_high=400
operating_data/content=0
operating_data/state=14
operating_data/substate=0
operating_data/boiler_pump_state=0
operating_data/dhw_valve_state=0
operating_data/house_pump_state=0
operating_data/sun_pump_state=0
operating_data/sun_surplus_state=0
operating_data/ashbox_minutes=0.0
operating_data/ashbox_contact=0.0
operating_data/internet_uptime=99
operating_data/off_on_alarm=0
operating_data/contact2=1
operating_data/NA=1
operating_data/NA=0
operating_data/NA=0
operating_data/corr_medium=0
operating_data/NA=0
operating_data/NA=34
operating_data/compressor_clean=0.0
operating_data/fan_speed=0.0 to operating_data/time=12/05-21 12:46:03
operating_data/boiler_temp=14.4
operating_data/smoke_temp=13.2
operating_data/return_temp=999.9
operating_data/dhw_temp=13.2
operating_data/external_temp=0.0
operating_data/t6_temp=0.0
operating_data/t7_temp=0.0
operating_data/distance=999
operating_data/photo_level=100
operating_data/shaft_temp=14.4
operating_data/milli_ampere=20
operating_data/oxygen=20.0
operating_data/flow1=0
operating_data/flow2=0
operating_data/flow3=0
operating_data/flow4=0
operating_data/power_pct=0
operating_data/power_kw=0.0
operating_data/oxygen_ref=0.0
operating_data/boiler_ref=21.0
operating_data/mean_out_temp=0.0
operating_data/dhw_ref=0.0
operating_data/forward_ref=0.0
operating_data/sun2_temp=0.0
operating_data/sun_dhw_temp=0.0
operating_data/sun_surplus_temp=0.0
operating_data/pressure=0.00
operating_data/air_flow=0
operating_data/sun_temp=0.0
operating_data/house_valve_state=1
operating_data/chill_out=0.0
operating_data/sun_pumpspeed=0
operating_data/sun_power_kw=0.0
operating_data/cloud_level=0
operating_data/forward_temp=0.0
operating_data/back_pressure=0
operating_data/t1_temp=0
operating_data/air_quality=0
operating_data/feed_low=1500
operating_data/feed_medium=210
operating_data/feed_high=400
operating_data/content=0
operating_data/state=14
operating_data/substate=0
operating_data/boiler_pump_state=0
operating_data/dhw_valve_state=0
operating_data/house_pump_state=0
operating_data/sun_pump_state=0
operating_data/sun_surplus_state=0
operating_data/ashbox_minutes=0.0
operating_data/ashbox_contact=0.0
operating_data/internet_uptime=99
operating_data/off_on_alarm=0
operating_data/contact2=1
operating_data/NA=1
operating_data/NA=0
operating_data/NA=0
operating_data/corr_medium=0
operating_data/NA=0
operating_data/NA=34
operating_data/compressor_clean=0.0
operating_data/fan_speed=0.0

My log config looks like this (file /srv/openhab2-userdata/etc/org.ops4j.pax.logging.cfg) - and I have added the lines to filter out the irrelevant stuff at the bottom of the config file - like the guidance said to do;

# Common pattern layout for appenders
#log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n

# Root logger
log4j2.rootLogger.level = WARN
log4j2.rootLogger.appenderRefs = out, osgi
log4j2.rootLogger.appenderRef.out.ref = LOGFILE
log4j2.rootLogger.appenderRef.osgi.ref = OSGI

# Karaf Shell logger
log4j2.logger.shell.name = org.apache.karaf.shell.support
log4j2.logger.shell.level = OFF
log4j2.logger.shell.appenderRefs = stdout
log4j2.logger.shell.appenderRef.stdout.ref = STDOUT

# Security audit logger
log4j2.logger.audit.name = org.apache.karaf.jaas.modules.audit
log4j2.logger.audit.level = INFO
log4j2.logger.audit.additivity = false
log4j2.logger.audit.appenderRefs = audit
log4j2.logger.audit.appenderRef.audit.ref = AUDIT

# openHAB specific logger configuration

log4j2.logger.openhab.name = org.openhab
log4j2.logger.openhab.level = INFO

log4j2.logger.smarthome.name = org.eclipse.smarthome
log4j2.logger.smarthome.level = INFO

log4j2.logger.smarthomeItemStateEvent.name = smarthome.event.ItemStateEvent
log4j2.logger.smarthomeItemStateEvent.level = ERROR
log4j2.logger.smarthomeItemAddedEvent.name = smarthome.event.ItemAddedEvent
log4j2.logger.smarthomeItemAddedEvent.level = ERROR
log4j2.logger.smarthomeItemRemovedEvent.name = smarthome.event.ItemRemovedEvent
log4j2.logger.smarthomeItemRemovedEvent.level = ERROR
log4j2.logger.smarthomeThingStatusInfoEvent.name = smarthome.event.ThingStatusInfoEvent
log4j2.logger.smarthomeThingStatusInfoEvent.level = ERROR
log4j2.logger.smarthomeThingAddedEvent.name = smarthome.event.ThingAddedEvent
log4j2.logger.smarthomeThingAddedEvent.level = ERROR
log4j2.logger.smarthomeThingRemovedEvent.name = smarthome.event.ThingRemovedEvent
log4j2.logger.smarthomeThingRemovedEvent.level = ERROR
log4j2.logger.smarthomeInboxUpdatedEvent.name = smarthome.event.InboxUpdatedEvent
log4j2.logger.smarthomeInboxUpdatedEvent.level = ERROR

log4j2.logger.events.name = smarthome.event
log4j2.logger.events.level = INFO
log4j2.logger.events.additivity = false
log4j2.logger.events.appenderRefs = event
log4j2.logger.events.appenderRef.event.ref = EVENT
log4j2.logger.events.appenderRef.osgi.ref = OSGI

log4j2.logger.jupnp.name = org.jupnp
log4j2.logger.jupnp.level = ERROR

log4j2.logger.jmdns.name = javax.jmdns
log4j2.logger.jmdns.level = ERROR

log4j2.logger.paperui.name = org.openhab.ui.paper
log4j2.logger.paperui.level = WARN
log4j2.logger.paperuiint.name = org.openhab.ui.paper.internal
log4j2.logger.paperuiint.level = INFO

# This suppresses all Maven download issues from the log when doing feature installations
# as we are logging errors ourselves in a nicer way anyhow.
log4j2.logger.paxurl.name = org.ops4j.pax.url.mvn.internal.AetherBasedResolver
log4j2.logger.paxurl.level = ERROR

# Filters known issues of pax-web (issue link to be added here).
# Can be removed once the issues are resolved in an upcoming version.
log4j2.logger.paxweb.name = org.ops4j.pax.web.pax-web-runtime
log4j2.logger.paxweb.level = OFF

# 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.
log4j2.logger.lsp4j.name = org.eclipse.lsp4j
log4j2.logger.lsp4j.level = OFF

# 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.
log4j2.logger.karservice.name = org.apache.karaf.kar.internal.KarServiceImpl
log4j2.logger.karservice.level = ERROR

# Filters warnings about unavailable ciphers when JCE is not installed, see
# https://github.com/openhab/openhab-distro/issues/999
log4j2.logger.sshutils.name = org.apache.karaf.shell.ssh.SshUtils
log4j2.logger.sshutils.level = ERROR

# Filters known issues of javax.mail, see
# https://github.com/openhab/openhab2-addons/issues/5530
log4j2.logger.javaxmail.name = javax.mail
log4j2.logger.javaxmail.level = ERROR

# Appenders configuration

# Console appender not used by default (see log4j2.rootLogger.appenderRefs)
log4j2.appender.console.type = Console
log4j2.appender.console.name = STDOUT
log4j2.appender.console.layout.type = PatternLayout
log4j2.appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n

# Rolling file appender
log4j2.appender.out.type = RollingRandomAccessFile
log4j2.appender.out.name = LOGFILE
log4j2.appender.out.fileName = ${openhab.logdir}/openhab.log
log4j2.appender.out.filePattern = ${openhab.logdir}/openhab.log.%i
log4j2.appender.out.immediateFlush = true
log4j2.appender.out.append = true
log4j2.appender.out.layout.type = PatternLayout
log4j2.appender.out.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n
log4j2.appender.out.policies.type = Policies
log4j2.appender.out.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.out.policies.size.size = 16MB

# Event log appender
log4j2.appender.event.type = RollingRandomAccessFile
log4j2.appender.event.name = EVENT
log4j2.appender.event.fileName = ${openhab.logdir}/events.log
log4j2.appender.event.filePattern = ${openhab.logdir}/events.log.%i
log4j2.appender.event.immediateFlush = true
log4j2.appender.event.append = true
log4j2.appender.event.layout.type = PatternLayout
log4j2.appender.event.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%-26.26c] - %m%n
log4j2.appender.event.policies.type = Policies
log4j2.appender.event.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.event.policies.size.size = 16MB

# Audit file appender
log4j2.appender.audit.type = RollingRandomAccessFile
log4j2.appender.audit.name = AUDIT
log4j2.appender.audit.fileName = ${openhab.logdir}/audit.log
log4j2.appender.audit.filePattern = ${openhab.logdir}/audit.log.%i
log4j2.appender.audit.append = true
log4j2.appender.audit.layout.type = PatternLayout
log4j2.appender.audit.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n
log4j2.appender.audit.policies.type = Policies
log4j2.appender.audit.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.audit.policies.size.size = 8MB

# OSGi appender
log4j2.appender.osgi.type = PaxOsgi
log4j2.appender.osgi.name = OSGI
log4j2.appender.osgi.filter = *

# Filter out AduroH2 event feedback (fills up event log)
log4j2.appender.event.filter.regex.type = RegexFilter
log4j2.appender.event.filter.regex.regex = .*aduroh2_opdata_Output_str.*
log4j2.appender.event.filter.regex.onMatch = DENY
log4j2.appender.event.filter.regex.onMismatch = ACCEPT
#

What am I doing wrong ? - why does the filtering not work on my event log ? I have tried rebooting, restarting etc.

Any ideas ?

It’s been a long time since I have looked at this, but two things 1) I thought the filter needed to be directly under the the other .event. lines and 2) Somewhere I thought the advice was to use onMismatch = NEUTRAL.

edit: found an old file. Might need parens () , unique name and onMisMatch. I think was working at the time.

log4j2.appender.event.filter.noise.type = RegexFilter
log4j2.appender.event.filter.noise.regex = .*(predicted|received|Node initialising|has been updated.).*
log4j2.appender.event.filter.noise.onMatch = DENY
log4j2.appender.event.filter.noise.onMisMatch = NEUTRAL

Updated the event log section in my config file to the below - and rebooted the OH server, but no change; the log is not filtered… Any other ideas ?

# Event log appender
log4j2.appender.event.type = RollingRandomAccessFile
log4j2.appender.event.name = EVENT
log4j2.appender.event.fileName = ${openhab.logdir}/events.log
log4j2.appender.event.filePattern = ${openhab.logdir}/events.log.%i
log4j2.appender.event.immediateFlush = true
log4j2.appender.event.append = true
log4j2.appender.event.layout.type = PatternLayout
log4j2.appender.event.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%-26.26c] - %m%n
log4j2.appender.event.policies.type = Policies
log4j2.appender.event.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.event.policies.size.size = 16MB
log4j2.appender.event.filter.noise.type = RegexFilter
log4j2.appender.event.filter.noise.regex = .*(aduroh2_opdata_Output_str).*
log4j2.appender.event.filter.noise.onMatch = DENY
log4j2.appender.event.filter.noise.onMisMatch = NEUTRAL

Can’t say that I do, except the nuclear option in the karaf console. I think for OH2.5.x it was log:set org.openhab.smarthome.event = WARN (or something like that).

Sorry

edit: one other vague memory. Do you see any related messages with sudo systemctl status openhab2?

onMismatch should only have one capital M. You typed it correctly in your original version, but not in the recent version after you moved it adjacent to the event log appender.

I don’t know if this will help, though. The onMatch line is the one that’s failing, since that’s where it should deny the log entry being appended.

Have you tried filtering any other items to see if it works with them?

OK - now had a bit of time to fiddle around with it a bit more.

Filtering works in general now; I tried both a simple single-filtering on some item in the event log - and that works. Also the multiple filter works as shown below - although it gives an errormessage in the karaf log, which can be ignored (filtering still works).

log4j2.appender.event.filter.stuff.type = Filters

log4j2.appender.event.filter.stuff.runsw.type = RegexFilter
log4j2.appender.event.filter.stuff.runsw.regex = .*(aduroh2_opdata_Run_switch).*
log4j2.appender.event.filter.stuff.runsw.onMatch = DENY
log4j2.appender.event.filter.stuff.runsw.onMismatch = NEUTRAL

log4j2.appender.event.filter.stuff.sled2.type = RegexFilter
log4j2.appender.event.filter.stuff.sled2.regex = .*(SaunaLED2ColorControl).*
log4j2.appender.event.filter.stuff.sled2.onMatch = DENY
log4j2.appender.event.filter.stuff.sled2.onMismatch = NEUTRAL

My issue is now, that the event log entries I originally wanted to filter out - still wont be filtered. The only thing which makes it different is, that the contents of the event (string item update) is very big/long:

2021-05-12 12:46:00.628 [vent.ItemStateChangedEvent] - aduroh2_opdata_Output_str changed from operating_data/time=12/05-21 12:45:03
operating_data/boiler_temp=14.4
operating_data/smoke_temp=13.3
operating_data/return_temp=999.9
operating_data/dhw_temp=13.2
operating_data/external_temp=0.0
operating_data/t6_temp=0.0
operating_data/t7_temp=0.0
operating_data/distance=999
operating_data/photo_level=100
operating_data/shaft_temp=14.4
operating_data/milli_ampere=30
operating_data/oxygen=20.0
operating_data/flow1=0
operating_data/flow2=0
operating_data/flow3=0
operating_data/flow4=0
operating_data/power_pct=0
operating_data/power_kw=0.0
operating_data/oxygen_ref=0.0
operating_data/boiler_ref=21.0
operating_data/mean_out_temp=0.0
operating_data/dhw_ref=0.0
operating_data/forward_ref=0.0
operating_data/sun2_temp=0.0
operating_data/sun_dhw_temp=0.0
operating_data/sun_surplus_temp=0.0
operating_data/pressure=0.00
operating_data/air_flow=0
operating_data/sun_temp=0.0
operating_data/house_valve_state=1
operating_data/chill_out=0.0
operating_data/sun_pumpspeed=0
operating_data/sun_power_kw=0.0
operating_data/cloud_level=0
operating_data/forward_temp=0.0
operating_data/back_pressure=0
operating_data/t1_temp=0
operating_data/air_quality=0
operating_data/feed_low=1500
operating_data/feed_medium=210
operating_data/feed_high=400
operating_data/content=0
operating_data/state=14
operating_data/substate=0
operating_data/boiler_pump_state=0
operating_data/dhw_valve_state=0
operating_data/house_pump_state=0
operating_data/sun_pump_state=0
operating_data/sun_surplus_state=0
operating_data/ashbox_minutes=0.0
operating_data/ashbox_contact=0.0
operating_data/internet_uptime=99
operating_data/off_on_alarm=0
operating_data/contact2=1
operating_data/NA=1
operating_data/NA=0
operating_data/NA=0
operating_data/corr_medium=0
operating_data/NA=0
operating_data/NA=34
operating_data/compressor_clean=0.0
operating_data/fan_speed=0.0 to operating_data/time=12/05-21 12:46:03
operating_data/boiler_temp=14.4
operating_data/smoke_temp=13.2
operating_data/return_temp=999.9
operating_data/dhw_temp=13.2
operating_data/external_temp=0.0
operating_data/t6_temp=0.0
operating_data/t7_temp=0.0
operating_data/distance=999
operating_data/photo_level=100
operating_data/shaft_temp=14.4
operating_data/milli_ampere=20
operating_data/oxygen=20.0
operating_data/flow1=0
operating_data/flow2=0
operating_data/flow3=0
operating_data/flow4=0
operating_data/power_pct=0
operating_data/power_kw=0.0
operating_data/oxygen_ref=0.0
operating_data/boiler_ref=21.0
operating_data/mean_out_temp=0.0
operating_data/dhw_ref=0.0
operating_data/forward_ref=0.0
operating_data/sun2_temp=0.0
operating_data/sun_dhw_temp=0.0
operating_data/sun_surplus_temp=0.0
operating_data/pressure=0.00
operating_data/air_flow=0
operating_data/sun_temp=0.0
operating_data/house_valve_state=1
operating_data/chill_out=0.0
operating_data/sun_pumpspeed=0
operating_data/sun_power_kw=0.0
operating_data/cloud_level=0
operating_data/forward_temp=0.0
operating_data/back_pressure=0
operating_data/t1_temp=0
operating_data/air_quality=0
operating_data/feed_low=1500
operating_data/feed_medium=210
operating_data/feed_high=400
operating_data/content=0
operating_data/state=14
operating_data/substate=0
operating_data/boiler_pump_state=0
operating_data/dhw_valve_state=0
operating_data/house_pump_state=0
operating_data/sun_pump_state=0
operating_data/sun_surplus_state=0
operating_data/ashbox_minutes=0.0
operating_data/ashbox_contact=0.0
operating_data/internet_uptime=99
operating_data/off_on_alarm=0
operating_data/contact2=1
operating_data/NA=1
operating_data/NA=0
operating_data/NA=0
operating_data/corr_medium=0
operating_data/NA=0
operating_data/NA=34
operating_data/compressor_clean=0.0
operating_data/fan_speed=0.0

Any ideas why this wont filter out ? - do I need a more complicated REGEX-statement for it than just the item name ? Any ideas would be appreciated - as I still very much would like to fix this in my log…

Google is my friend; through this page:
https://gist.github.com/jsvd/2ceed2eccf1c14f197ce791a302af838

What I needed was a “enable DOTALL” (?s) in front of the regex statement I had.

My filter section now looks like this - and works;

############ CUSTOM FILTERS START HERE #################
log4j2.appender.event.filter.stuff.type = Filters

log4j2.appender.event.filter.stuff.oprunsw.type = RegexFilter
log4j2.appender.event.filter.stuff.oprunsw.regex = .*(aduroh2_opdata_Run_switch).*
log4j2.appender.event.filter.stuff.oprunsw.onMatch = DENY
log4j2.appender.event.filter.stuff.oprunsw.onMismatch = NEUTRAL

log4j2.appender.event.filter.stuff.sbrunsw.type = RegexFilter
log4j2.appender.event.filter.stuff.sbrunsw.regex = .*(aduroh2_setboiler_Run_switch ).*
log4j2.appender.event.filter.stuff.sbrunsw.onMatch = DENY
log4j2.appender.event.filter.stuff.sbrunsw.onMismatch = NEUTRAL

log4j2.appender.event.filter.stuff.opodata.type = RegexFilter
log4j2.appender.event.filter.stuff.opodata.regex = (?s).*(aduroh2_opdata_Output_str).*
log4j2.appender.event.filter.stuff.opodata.onMatch = DENY
log4j2.appender.event.filter.stuff.opodata.onMismatch = NEUTRAL

################# END OF FILTERS ######################

I can’t seem to figure out this filtering. I just upgraded to OH3.1 from 2.5 yesterday. I have been wanting to filter out these events for a long time, but never got around to it.

2021-10-28 10:59:03.780 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Local_DateTime' changed from 2021-10-28T10:58:03.763-0400 to 2021-10-28T10:59:03.765-0400

Below is the contents of my /var/lib/openhab/etc/org.ops4j.pax.logging.cfg.

org.ops4j.pax.logging.log4j2.config.file=${karaf.etc}/log4j2.xml

# Filtering Rules
log4j2.appender.event.filter.cleanup.type = Filters
log4j2.appender.event.filter.cleanup.Local_DateTime.type = RegexFilter
log4j2.appender.event.filter.cleanup.Local_DateTime.regex = (?s).*(Local_DateTime).*
log4j2.appender.event.filter.cleanup.Local_DateTime.onMatch = DENY
log4j2.appender.event.filter.cleanup.Local_DateTime.onMismatch = ACCEPT

Thanks for any assistance you can provide.

I see now it’s different in OH3. I suppose I have to do everything in the XML file or at least in this file, but in XML format as the file it’s referencing in the first line?