I’m trying to filter out the log messages from moquette that fill up my log like this:
2020-02-19 20:55:43.519 [WARN ] [moquette.spi.impl.SessionsRepository] - Session does not exist. CId=mqtt-explorer-4dce853f
I can find references and examples on how to filter events, but I can’t work out what I need to filter these messages out (which I guess are not events).
I’m assuming I need something like this:
log4j2.appender.event.filter..type = RegexFilter
log4j2.appender.event.filter..regex = .(<your_filter_string1>|||).
log4j2.appender.event.filter..onMatch = DENY
log4j2.appender.event.filter..onMisMatch = ACCEPT
but with “event” replaced by something else? I’d be grateful for any advice.
This indicated your have a problem with your embeded broker.
This broker is now obsolete and the not maintained.
It is strngly recommended that your switch to an other broker. The reference is mosquitto
Thanks for responding. I’m aware that I need to switch to mosquitto before too long. Meanwhile the embedded server has been working fine for me for several months, apart from a large number of inconvenient warning messages. Just at the moment I’m tinkering with a couple of new devices and I’d like to be able to prevent these messages being logged to make it easier to see the useful ones.
I thought it would be easy to set up a logging filter, but looking into it I found I didn’t understand enough about how logging works, so I’d like to understand that.
Hence my request for advice on log filtering, as in the topic heading, rather than about mqtt servers. I was rather hoping someone might point me in the right direction for information about log filtering - I found it hard to find any documentation that helped.