You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Scott Deboy <sc...@gmail.com> on 2012/08/06 04:06:17 UTC

Logger.callAppenders equivalent in Log4j2?

The Receiver class sends events to appenders by calling calling
Logger.callAppenders(event).

What is the equivalent logic in log4j2?

Scott

Re: Logger.callAppenders equivalent in Log4j2?

Posted by Ralph Goers <ra...@dslextreme.com>.
In the API AbstractLogger provides most of the actual callable logging methods. They end up calling the log method which is provided by the impl (org.apache.logging.log4j.core.Logger).  Each of these Loggers has a PrivateConfig that points to its relevant LoggerConfig (this is where the Appender and Filters are configured).  The logger calls the LoggerConfig's log method. The LoggerConfig's log method then calls the callAppenders method, which is also located in the LoggerConfig.

I would suggest you look at AbstractServer. I believe it is already doing what you want.

Ralph

On Aug 5, 2012, at 7:06 PM, Scott Deboy wrote:

> The Receiver class sends events to appenders by calling calling Logger.callAppenders(event).
> 
> What is the equivalent logic in log4j2?
> 
> Scott


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org