Hi Walden,
 
Thanks - that looks like it's what I was hoping for (although a bit more
convoluted than I'd prefer :-)
 
One further question. For the situations where there is no exception, is
it OK to use null for the fourth argument?
 
(There apparently is no overload that omits that fourth argument.)
 
Thanks again.
 
Rennie
 


________________________________

        From: Walden H. Leverich [mailto:[EMAIL PROTECTED] 
        Sent: 27. juni 2008 23:18
        To: Log4NET User
        Subject: RE: Specifying log level at runtime
        
        

        Something along these lines? 

         

        log.Logger.Log(this.GetType(), log4net.Core.Level.Critical, "The
message", theException);

         

        where log is the "normal" class-level logger:

         

        static readonly log4net.ILog log =
log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMeth
od().DeclaringType);

         

        -Walden

         

        -- 

        Walden H Leverich III
        Tech Software
        (516) 627-3800 x3051

        [EMAIL PROTECTED]
        http://www.TechSoftInc.com
<BLOCKED::blocked::http://www.techsoftinc.com/> 
        
        Quiquid latine dictum sit altum viditur.
        (Whatever is said in Latin seems profound.)

Reply via email to