logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: Runtime configurations
Date Thu, 14 Sep 2006 02:52:40 GMT
You may need to do some casting:

 ((Logger)log.Logger).AddAppender(consoleAppender);
 ((Logger)log.Logger).Appenders;

--- Gonçalo Luiz <goncalo.luiz@gmail.com> wrote:

> Hello,
> 
> I'd like to configure my logging infrastructure without touching the
> .xml that will only be the "default" values for the system.
> 
> For instance I'd like to change the log level of a given Logger, or
> to
> add/remove appenders to a given Logger.
> Also, I'd like to change layouts and appenders configurations in
> runtime too.
> 
> I think I can manage Layouts and Appenders, since they expose public
> properties that are identical to the available configurations in the
> XML file.
> 
> However the ILog interface does not have a property to the debug
> level
> nor to the associated appenders, for instance.
> 
> How can I achieve this one ?
> 
> 
> Best Regards,
> 


Mime
View raw message