You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by hb...@softhome.net on 2005/06/09 08:45:57 UTC

log4net.Config.XmlConfigurator.ConfigureAndWatch()

Hi 

I would like to know what will happen if I get a logger using LogManager and 
make a log call using the logger without first calling the 
log4net.Config.XmlConfigurator.ConfigureAndWatch(configFileInfo). Will 
log4net log an error( assuming log4net.internal.debug is set to true) or 
will it silently ignore it? I tried it and it seems log4net is silently 
ignoring it. Actually I would have expected some sort of error/information 
logged by log4net to signal this condition. Am I missing something? 

Thanks,
Hemant 


Re: log4net.Config.XmlConfigurator.ConfigureAndWatch()

Posted by Surya Jakhotia <su...@gmail.com>.
Is this what you are looking for?
 http://logging.apache.org/log4net/release/manual/faq.html#internalDebug
 Thanks,
Surya

 On 6/9/05, hbmlists@softhome.net <hb...@softhome.net> wrote: 
> 
> Ron,
> 
> I agree that log4net should never raise an exception. But my suggestion is
> that it should atleast log some message to signal that Configure has not
> been called.
> 
> Thanks,
> Hemant
> 
> Ron Grabowski writes:
> 
> > log4net should never raise an exception. Its been designed to not
> > interfere with your application. If you do not call Configure, log4net
> > will not configure itself.
> >
> > --- hbmlists@softhome.net wrote:
> >
> >>
> >> Hi
> >>
> >> I would like to know what will happen if I get a logger using
> >> LogManager and
> >> make a log call using the logger without first calling the
> >> log4net.Config.XmlConfigurator.ConfigureAndWatch(configFileInfo).
> >> Will
> >> log4net log an error( assuming log4net.internal.debug is set to true)
> >> or
> >> will it silently ignore it? I tried it and it seems log4net is
> >> silently
> >> ignoring it. Actually I would have expected some sort of
> >> error/information
> >> logged by log4net to signal this condition. Am I missing something?
> >>
> >> Thanks,
> >> Hemant
> >>
> >>
> >
> 
>

Re: log4net.Config.XmlConfigurator.ConfigureAndWatch()

Posted by hb...@softhome.net.
Ron, 

I agree that log4net should never raise an exception. But my suggestion is 
that it should atleast log some message to signal that Configure has not 
been called. 

Thanks,
Hemant 

Ron Grabowski writes: 

> log4net should never raise an exception. Its been designed to not
> interfere with your application. If you do not call Configure, log4net
> will not configure itself. 
> 
> --- hbmlists@softhome.net wrote: 
> 
>> 
>> Hi  
>> 
>> I would like to know what will happen if I get a logger using
>> LogManager and 
>> make a log call using the logger without first calling the 
>> log4net.Config.XmlConfigurator.ConfigureAndWatch(configFileInfo).
>> Will 
>> log4net log an error( assuming log4net.internal.debug is set to true)
>> or 
>> will it silently ignore it? I tried it and it seems log4net is
>> silently 
>> ignoring it. Actually I would have expected some sort of
>> error/information 
>> logged by log4net to signal this condition. Am I missing something?  
>> 
>> Thanks,
>> Hemant  
>> 
>> 
> 
 

Re: log4net.Config.XmlConfigurator.ConfigureAndWatch()

Posted by Ron Grabowski <ro...@yahoo.com>.
log4net should never raise an exception. Its been designed to not
interfere with your application. If you do not call Configure, log4net
will not configure itself.

--- hbmlists@softhome.net wrote:

> 
> Hi 
> 
> I would like to know what will happen if I get a logger using
> LogManager and 
> make a log call using the logger without first calling the 
> log4net.Config.XmlConfigurator.ConfigureAndWatch(configFileInfo).
> Will 
> log4net log an error( assuming log4net.internal.debug is set to true)
> or 
> will it silently ignore it? I tried it and it seems log4net is
> silently 
> ignoring it. Actually I would have expected some sort of
> error/information 
> logged by log4net to signal this condition. Am I missing something? 
> 
> Thanks,
> Hemant 
> 
>