[SOLVED] Filtering INFO messages

I have been looking for in the Community but I do not find how to filte INFO message in the Log.

2018-12-03-18:56:32.662 [INFO] [org.openhab.binding.network] - Running arping... 

Did you want to filter something out of the logs(remove)? If so this works great.

I saw that threat but is not working. I guess beacuase I am not filtering an EVENT, but an INFO message, and not a EVENT

2018-12-03 19:04:39.233 [ome.event.ItemCommandEvent] - Item 'sonoffD5_2' received command OFF
2018-12-03 19:04:39.342 [ome.event.ItemCommandEvent] - Item 'sonoffD6_1' received command OFF
2018-12-03 19:04:39.431 [ome.event.ItemCommandEvent] - Item 'sonoffD6_2' received command ON
2018-12-03 19:05:16.837 [INFO ] [org.openhab.binding.network         ] - Running arping 2.14+ for mac
2018-12-03 19:05:16.992 [INFO ] [org.openhab.binding.network         ] - arping via eth0 
2018-12-03 19:05:17.112 [INFO ] [org.openhab.binding.network         ] - arping via eth0 => online

you can apply the same logic to openhab.log also
you just need to adopt the linked example to your use case

in the same file?

yes, all logging configs can be customized in $OPENHAB_USERDATA/etc/org.ops4j.pax.logging.cfg file

see here also: Log4j2 Sample Config

edit: by the way: you can decrease the overall log level of the org.openhab.binding.network from INFO to WARN to get rid of these entries (instead of filtering out the Running arping... from all the INFO entries)

oooh, this is interesting. Thanks for the link. I read it.

1 Like