Hi I want to filter my logs in a special way: I have a high frequented system. A lot of devices are connected and are sending messages all time. To log all is impossible. Now I'm searching for a way to log all things are not depending on device messages and to log the other messages only of a special device. I found, that I could mark these logs but I have no idea to combine both log types:
public someMethod (String serial){
Marker sm = org.slf4j.MarkerFactory.getMarker(serial);
log.info("A log message I want to find each time");
log.debug(sm, "This log I want to filter out only for serial: "+ serial);
...
I'm working with spring boot and log4j. I tried vaious filters, but without success. Any one any idea?