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:[EMAIL PROTECTED] 
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:[EMAIL PROTECTED] 
> Sent: 23 April 2006 22:13
> To: [email protected]
> 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
> 
>  
> 
> 



Reply via email to