Bill,

Is this behaviour reproducible in more than one new apps? Is logging
still working correctly in old applications? Your configuration appears
to be simple and straightforward.

What is the relationship between the names of the loggers (full class
names of the container type) that work and don't work.

Have you tried logging a message immediately after calling Configure?


Nicko
 

> -----Original Message-----
> From: Bill Swartz [mailto:[EMAIL PROTECTED] 
> Sent: 21 January 2005 22:16
> To: [email protected]
> Subject: Logging not working in some classes
> 
> Hi,  
> 
> I've got logging setup and working fine in a number of apps, 
> but all of a sudden it won't work on new apps, but only in a 
> few classes.
> 
> Ie:  in class Main, logging returns nothing, but in class 
> util which main
> calls, logging works fine.     
> 
> 
> Any thoughts?? Or suggestions? (using 1.2.0 Beta 8)
>  
> 
> //Here is the one that is NOT working
> private static readonly ILog log = LogManager.GetLogger(typeof(Main));
> 
> DOMConfigurator.Configure(new System.IO.FileInfo("logging.xml"));
> 
> If (log.IsDebugEnabled) log.Debug("test");
> 
> //This one for this class works fine (in the same program) 
> private static readonly ILog log = 
> LogManager.GetLogger(typeof(DtsPackage));
> 
> 
> Here is the log4net debug output.
> 
> log4net: DOMConfigurator: Configuration update mode [Merge].
> log4net: DOMConfigurator: Logger [root] Level string is [DEBUG].
> log4net: DOMConfigurator: Logger [root] level set to 
> [name="DEBUG",value=30000].
> log4net: DOMConfigurator: Loading Appender [LogFileAppender] type:
> [log4net.Appender.FileAppender]
> log4net: DOMConfigurator: Setting Property [File] to String 
> value [F:/eTransfers/hecc/logs/HeccProcess.log]
> log4net: DOMConfigurator: Setting Property [AppendToFile] to 
> Boolean value [True]
> log4net: DOMConfigurator: Setting Property [Header] to String 
> value [Hecc Transfer ]
> log4net: DOMConfigurator: Setting Property [Footer] to String value []
> log4net: DOMConfigurator: Setting Property 
> [ConversionPattern] to String value [%d %-5p %c - %m%n]
> log4net: DOMConfigurator: Setting Property [Layout] to object 
> [log4net.Layout.PatternLayout]
> log4net: FileAppender: Opening file for writing 
> [F:\eTransfers\hecc\logs\HeccProcess.log] append [True]
> log4net: DOMConfigurator: Created Appender [LogFileAppender]
> log4net: DOMConfigurator: Adding appender named 
> [LogFileAppender] to logger [root].
> log4net: DOMConfigurator: Hierarchy Threshold []
> 
> 
> Appreciate any help.
> Bill
> 
> 

Reply via email to