Currently I do this based on the Item name in the regex filter.
This seems to work. But is it possible to log the ItemStateChangedEvent (which is also in the NOVELANEVENT AppenderRef) based on the binding names?
And is it possible to combine multiple filters? For example I want to see all log messages for the binding except for 2?
I thougt maybe something like this:
As far as I understand the log4j2 concept of filters the next regex filter in a list of filters is only executed if the previous filters did not return ACCEPT or DENY but NEUTRAL.
That means your first filter always returns either ACCEPT or DENY and thus the second filter will not be executed.
=> try to change the sequence
If I understand it correctly I have a filter which accepts all log entries which match to Waermepumpe. If it mismatchs it is neutral so the next filter could be applied. This should deny the entries with WaermepumpeRuntime.
But in my Logfile I see all Events. Not only the Waermepumpe related entries.
Ah. But there is still the question if it is possible to filter for the ItemChangedEvent of a specific binding or if I need to rename every Item so it starts with the binding name like MQTT_*** deconz_**** and use this naming to filter some things out. Does anybody know if this is possible without renaming?
Do a trial …
Make a first rule ( beofore the other ones ).
Make this rule an expression that matches everything ( (.*) ) with onMatch=“ACCEPT” onMismatch=“NEUTRAL”.
This should put everything into that file. In case the event is in that you are looking for as well it should be possible to additionally catch that event.
It might be possible that the PatternLayout part needs to be changed in a way that the binding name appears in the logging ( in case it not does already ).