Custom Logging on OH3

Hi everyone,

I am running OH3 and I am very happy about it.
Especially the new UI is much better than PaperUI (no offense to the creators of PaperUI :wink:

Since the log4j2 has moved to xml, I am lost migrating my REGEX filters to the xml.
Here is one example I would like to move over:

log4j2.appender.event.filter.trash.type = RegexFilter
log4j2.appender.event.filter.trash.regex = .*(CPU_System|MEM_|SWP_Used|Alexa_Mus).*
log4j2.appender.event.filter.trash.onMatch = DENY
log4j2.appender.event.filter.trash.onMisMatch = ACCEPT

In the default xml I don’t see how to use REGEX.

Any help is greatly appreciated

Thanks a lot
I wonder why I did not find this thread myself?
:grimacing:

It usually helps to sort the search results by latest post instead of the most relevant.

1 Like

That’s a very goog point - especially for OH3 related stuff.

Just a brief update:
Even though I read in other posts, that a restart for custom filters is not required, my custom filters did not work until I restarted OH.

FYI, there’s now a PR to fix this in the next snapshot release.