logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Irene Altdorf" <ialtd...@avalere.com>
Subject RE: Interface method to request the level of a Logger?
Date Mon, 24 Apr 2006 13:40:59 GMT
Thanks for your quick response, Nicko.

I tried this, but even though the logger level was error (I tested
'log.IsErrorEnabled' just before the code you suggested), the line below had
'null' for the level.  Would there be a way around this?

Thanks again,
Irene

-----Original Message-----
From: Nicko Cadell [mailto:nicko@neoworks.com] 
Sent: Sunday, April 23, 2006 6:17 PM
To: Log4NET User
Subject: RE: Interface method to request the level of a Logger?

Try:

((log4net.Repository.Hierarchy.Logger)(log.Logger)).Level

Nicko

> -----Original Message-----
> From: Irene Altdorf [mailto:ialtdorf@avalere.com] 
> Sent: 23 April 2006 22:13
> To: log4net-user@logging.apache.org
> Subject: Interface method to request the level of a Logger?
> 
> Hello,
> 
>  
> 
> Is there an interface method to get the current level of a 
> Logger?  Using the ILog interface, I can determine whether 
> certain levels are enabled via the IsxxxEnabled property, but 
> I was hoping to be able to make one call to get the current 
> Logger level.  It might seem like an odd request, but we will 
> be passing that info on to a lower level component.
> 
>  
> 
> Sorry if I have missed something obvious.
> 
>  
> 
> Thanks,
> 
> Irene
> 
>  
> 
> 




Mime
View raw message