What do you mean by “capture the events from our appenders”?  The StatusLogger 
is primarily used during configuration or to log errors that occur in the 
appender. If you are trying to capture the events being logged that sounds a 
bit odd as that is the purpose of an appender.

If you want to capture all the Log4j status logger output you can specify a 
destination on the configuration element. The output will then be written to 
that location instead of to stdout.

Ralph

> On Nov 20, 2015, at 8:01 AM, Nicholas Duane <[email protected]> wrote:
> 
> The code happens to be a log4j2 appender, so it sounds like you're saying we 
> should be using the StatusLogger, correct?  The issue is that we want to 
> capture the events from our appenders to a central location.
> 
> Thanks,
> Nick
> 
>> Subject: Re: StatusLogger
>> From: [email protected]
>> Date: Thu, 19 Nov 2015 19:01:45 -0700
>> To: [email protected]
>> 
>> Yes, the StatusLogger is how Log4j logs things that happen within Log4j 
>> itself. If you are writing plugins for Log4j those should also use the 
>> StatusLogger as they effectively become part of Log4j. If the are regular 
>> application code then they should not use the StatusLogger.
>> 
>> Although the StatusLogger uses the same API as the Log4j API its 
>> implementation is quite different and much more limited in what can be done 
>> with the output.
>> 
>> The StatusLogger implementation doesn’t have Appenders. Instead it has 
>> StatusListeners that receive the events. The only listeners provided with 
>> Log4j are the StatusConsoleListener, which writes events to stdout or a 
>> PrintStream, and StatusLoggerAdmin, which makes events available over JMX.
>> 
>> Ralph
>> 
>> 
>> 
>>> On Nov 19, 2015, at 6:33 PM, Nicholas Duane <[email protected]> wrote:
>>> 
>>> I'm trying to get information on the StatusLogger.  I've searched and so 
>>> far the log4j docs say:
>>> 
>>> "Records events that occur in the logging system."
>>> 
>>> There are also a bunch of articles related to people having problems with 
>>> the StatusLogger.  I'm just looking to find out what it is.  It appears 
>>> it's somewhat of an "internal" logger that log4j (log4j2) uses to log 
>>> internal events.  One reason I'm looking into this is because I see some 
>>> code in one of our projects in which the class is logging to the 
>>> StatusLogger.  I assume we shouldn't be doing this.
>>> 
>>> Is the StatusLogger used in log4j2?  In one post I read that the "status" 
>>> attribute controls the level.  Can I set the appender for the StatusLogger?
>>> 
>>> Thanks,
>>> Nick
>>>                                       
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>                                         



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to