RE: Configuration in COM+ Server Application

2005-07-25 Thread Craig Boland
Have you considered a static constructor? They execute at most one time and are thread-safe. If you have several classes in your component it may be better to more the log4net construction into a separate class or method so it can be synchronized. The Double-Checked Locking pattern may be useful th

RE: Truncate log file before each run

2005-07-25 Thread Usman Uppal
Thank You Ron. -Original Message- From: Ron Grabowski [mailto:[EMAIL PROTECTED] Sent: Monday, July 25, 2005 7:05 PM To: Log4NET User Subject: Re: Truncate log file before each run Set the FileAppender's appendToFile attribute to false: --- Usman Uppal <[EMAIL PROTECTED]> wrote: > Is

Re: Truncate log file before each run

2005-07-25 Thread Ron Grabowski
Its more of a node/property than an attribute :-/ --- Ron Grabowski <[EMAIL PROTECTED]> wrote: > Set the FileAppender's appendToFile attribute to false: > > > > --- Usman Uppal <[EMAIL PROTECTED]> wrote: > > > Is it possible to configure appender to truncate log file before > each > > run? >

Re: Truncate log file before each run

2005-07-25 Thread Ron Grabowski
Set the FileAppender's appendToFile attribute to false: --- Usman Uppal <[EMAIL PROTECTED]> wrote: > Is it possible to configure appender to truncate log file before each > run? > > > > Thanks, > > > > Usman > > > >

Truncate log file before each run

2005-07-25 Thread Usman Uppal
Is it possible to configure appender to truncate log file before each run?   Thanks,   Usman  

RE: Question

2005-07-25 Thread Makhija, Amit
Thanks a ton Nicko :-) -Original Message- From: Nicko Cadell [mailto:[EMAIL PROTECTED] Sent: Monday, July 25, 2005 12:26 PM To: Log4NET User Subject: RE: Question Yes in that case log4net is partially configured. Currently that is a situation that is difficult to detect. If you need t

RE: Question

2005-07-25 Thread Nicko Cadell
Yes in that case log4net is partially configured. Currently that is a situation that is difficult to detect. If you need to detect this you will have to write a .net trace listener which will capture the output the log4net also writes to the console, and parse this output for the log4net error mess

RE: Question

2005-07-25 Thread Makhija, Amit
Thanks Nicko for a quick reply. I had a entry in my configuration file as The ref attribute is ponting to a appender which doesn't exist. In this case too the log4net.LogManager.GetRepository().Configured property returns true. Thanks, -Amit

RE: Question

2005-07-25 Thread Nicko Cadell
Log4net is designed not to throw any exceptions up into the main application. http://logging.apache.org/log4net/release/faq.html#reliability You can test if log4net is configured by checking this property: bool isConfiguredOk = log4net.LogManager.GetRepository().Configured; Nicko > -Origina

Question

2005-07-25 Thread Makhija, Amit
Hi,   I am having a question regarding the initialization of log4net. I am trying to initialize the log4net in the following manner XmlConfigurator.ConfigureAndWatch(new FileInfo(fileName)) Even if I pass an invalid ( not well formed) xml it doesn't throw any exception and doesn't let my app