Hi Gary, Yes, I want to use specific marker on one more loggers, I mean current way of using marker is not so convenient if I want to add same marker to multiple log records, so I require to add marker to a logger directly, then all log records using this logger will have this marker automatically, do we have this feature now in log4j2.5? or is there any workaround to achieve this?
Best regards. -----Original Message----- From: Gary Gregory [mailto:garydgreg...@gmail.com] Sent: Monday, March 28, 2016 10:41 PM To: Log4J Users List Subject: Re: is there any way to add a marker to a logger rather than a log Do you plan on using this marker with more than one logger? Gary On Mar 28, 2016 1:35 AM, "Maple Wang" <maple.feng.w...@hotmail.com> wrote: > 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. > > --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org