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
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
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?
>
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
>
>
>
>
Is it possible to configure appender to truncate log file
before each run?
Thanks,
Usman
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
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
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
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
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
10 matches
Mail list logo