Hi,

 

Marker is great feature for classifying and filtering log content, but I
have a question about how to use marker in logging API. In official guide
for log4j2.x, normally, we need to do as blow:

 

Marker myMarker =  MarkerManager.getMarker("myMarker");

LOGGER.info(myMarker,"some log message");

 

This is good, but in my situation, I want to add a marker directly to a
LOGGER, then, every time user use "LOGGER.info("some log message");", the
marker will be added automatically. Is there any way to help me to achieve
this?

 

Thanks in advance.

 

Best regards.

Reply via email to