Just adding this here since I couldn’t find it again after doing it almost a year ago, and the OH2.2 upgrade reverted the /srv/openhab2-userdata/etc/org.ops4j.pax.logging.cfg file.
Simple string filtering on the event log. Useful for filtering out high change items that don’t need constant log visibility.
Prior to OH2.2 - using log4j
# Jp - filter out stuff
log4j.appender.event.filter.smappee=org.apache.log4j.varia.StringMatchFilter
log4j.appender.event.filter.smappee.StringToMatch=power_smappee
log4j.appender.event.filter.smappee.AcceptOnMatch=false
Taken from an example in Log4j2 Sample Config, the following appears to do the same under OH2.2
# Jp - filter out stuff
log4j2.appender.event.filter.regex.type = RegexFilter
log4j2.appender.event.filter.regex.regex = .*power_smappee.*
log4j2.appender.event.filter.regex.onMatch = DENY
log4j2.appender.event.filter.regex.onMisMatch = ACCEPT
There are probably better ways to do it, but for now that works, and excludes the power_smappee (power consumption, changes by the second) from the log files.
Thx.
Jp.