rpwong
(Russ)
February 13, 2024, 8:24pm
148
It appears that you’ve used the example from the first post, which was written for OH2 over six years ago. Per the discussion, it does not work in OH3 (or OH4). You need this:
So for those that want an OH3 filter that does as the first post asks with a simple cut and past solution try this example. (OpenHabian on Raspi 4 OpenHAB 3.2.0)
To filter out an entry in the log like:
2022-04-30 18:55:21.231 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SqueezeBoxReceiverCurrentPlayingTime' changed from 227 to 228
Then edit /var/lib/openhab/etc/log4j2.xml
...
<!-- Event log appender -->
<RollingRandomAccessFile fileName="${sys:o…
And if you want to have multiple filters, you can use this.
I also just played around with filters, thanks a lot for this helpful post!
While doing some playing around, I found a way to better organize multiple RegexFilters without concatenating them with OR.
<Filters>
<RegexFilter regex=".*Systeminfo_.*" onMatch="DENY" onMismatch="NEUTRAL"/>
<RegexFilter regex=".*CPUUtilization_.*" onMatch="DENY" onMismatch="NEUTRAL"/>
<RegexFilter regex=".*Nightscout_.*" onMatch="DENY" onMismatch="NEUTRAL"/>
</Filters>
By wrapping RegexFilters insi…