logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: is there any way to add a marker to a logger rather than a log
Date Mon, 28 Mar 2016 14:41:18 GMT
Do you plan on using this marker with more than one logger?

Gary
On Mar 28, 2016 1:35 AM, "Maple Wang" <maple.feng.wang@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.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message