Is there a way to suppress certain errors in the Logs

I was wondering if there was a way to suppress certain errors from appearing in the Log. I have a RFID tag reading system and sometimes one of the fields being read from the tags is returned as a NULL value causing a invalid amount of fields error to show up in my logs I have already programed inside my application itself to handle when this occurs however it still produces an error in the log adding clutter.


You can set logging levels for specific loggers, but not for specific messages.

Yikes that is going to be problematic. This application will be reading tags 24/7 and the occurrence of the empty field is pretty frequent like 3 times every minute.

Thanks for the information I appreciate it.

I haven't used this before, but based on the logback documentation, you may be able to apply filtering to prevent events with certain messages from showing in the logs. Also, here's a KBA regarding migrating loggers that should help get you started with modifying the logback.xml.


Thanks for the information, I will look into it!