I’m running 5.0.2 and events.log is no more filtered according to userdata/etc/log4j2.xml
So what’s in your log4j2.xml that’s doing the filtering?
`<!-- Event log appender -->
<RollingRandomAccessFile fileName="${sys:openhab.logdir}/events.log" filePattern="${sys:openhab.logdir}/events.log.%i" name="EVENT">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
<Regexfilter onMatch="DENY" onMismatch="ACCEPT" regex=".*(radio|sensorStairs|winkly|ower|_Last|_.urrent|_energy|raw_|Vorraum_|_LightBasement|_Leistung|_Luftfeuchtigkeit|Temperatur|vonBritta|Tims|BrigittesG8441_|ManfredsPixel4_|Raspi4mubopenhabian_|machine_runtime|Average|ryer|_Zuletztgesehen|Player|channel|Consumption|_Echo_).*"/>
<Policies>
<OnStartupTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="32 MB"/>
</Policies>
</RollingRandomAccessFile>`
And an example log statement that should match the pattern?
I know of nothing that has changed in log4j2 for OH 5.0.2. I don’t even think the version of log4j2 changed between OH 4 and OH 5. But the log statements themselves may have changed.
I have some Filters tags around the regex and that is working fine on OH 5.x
<Filters>
<Regexfilter ...
</Filters>
Can you please send me your log4j2.xml? Feel free to remove your regex filters beforehand. I have
tested my regex, they work.
...
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-45.45c] - %m%n"/>
<!-- Regex filter added start-->
<Filters>
<RegexFilter onMatch="DENY" onMismatch="ACCEPT" regex=".*entry1.*|.*entry2.*|.*entry3.*"/>
</Filters>
<!-- Regex filter added stop-->
<Policies>
...
You can find the default log4j2.xml here:
Thank you for your help. I downloaded log4j2.xml from the distribution, copied in my RegexFilter and backed it up to/var/log/openhab.
After restarting openHAB, the RegexFilters are correctly considered.
The downloaded file sets:
<Logger level="ERROR" name="org.openhab"/>
This prevents logs created by console.info in your scripts. You may prefer:
<Logger level="INFO" name="org.openhab"/>
to keep your logging informations.