logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: Dynamically (programmatically) add logger in Log4j2
Date Mon, 16 Dec 2013 16:40:17 GMT
The addLogger method in BaseConfiguration only allows LoggerConfigs to be added before the
configuration is started.  In looking at the code I think at the time I was being overly cautious
and that the check can be removed.  What is interesting is that the addLoggerAppender method
will create a new LoggerConfig if one doesn’t exist that matches the name of the Logger.
 

Please create an enhancement request and I will look into this.

Ralph



On Dec 16, 2013, at 7:27 AM, dxande6 <deananderson001@gmail.com> wrote:

> I've tried that and the logConf returned is from the root logConfig
> (name="").
> 
> I want to add an additional logger with the name (x.y.z).  I do not want to
> change the log level of the root logger in this case.
> 
> Any other thoughts?
> 
> 
> 
> --
> View this message in context: http://apache-logging.6191.n7.nabble.com/Dynamically-programmatically-add-logger-in-Log4j2-tp42273p42275.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 


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


Mime
View raw message