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 Ratheesh Vijay <rk...@in.rm.com> on 2010/08/30 11:13:32 UTC

Does log4net throws IO exceptions?

Hi,

I am using log4net with c# 2.0 framework for logging. 
Does log4net throws IO Exceptions when unable to write the log to a disk?
How to handle the IO exceptions thrown from a lower level?
What about using delegate to effectively handle the exceptions thrown so
that minimal code change required at calling places?

Any help anyone could produce would highly be appreciated.

Thanks
Ratheesh

-- 
View this message in context: http://old.nabble.com/Does-log4net-throws-IO-exceptions--tp29570734p29570734.html
Sent from the Log4net - Users mailing list archive at Nabble.com.


Re: Does log4net throws IO exceptions?

Posted by Dean Fiala <df...@gmail.com>.
No, log4net swallows its internal exceptions so your logging tool does
not blow up your app.

http://log4net.sourceforge.net/release/1.2.0.30316/doc/manual/faq.html#reliable

You can turn on its internal debugging, which writes exceptions to the
console and trace logs.

http://log4net.sourceforge.net/release/1.2.0.30316/doc/manual/faq.html#internalDebug

On Mon, Aug 30, 2010 at 5:13 AM, Ratheesh Vijay <rk...@in.rm.com> wrote:
>
> Hi,
>
> I am using log4net with c# 2.0 framework for logging.
> Does log4net throws IO Exceptions when unable to write the log to a disk?
> How to handle the IO exceptions thrown from a lower level?
> What about using delegate to effectively handle the exceptions thrown so
> that minimal code change required at calling places?
>
> Any help anyone could produce would highly be appreciated.
>
> Thanks
> Ratheesh
>
> --
> View this message in context: http://old.nabble.com/Does-log4net-throws-IO-exceptions--tp29570734p29570734.html
> Sent from the Log4net - Users mailing list archive at Nabble.com.
>
>



-- 
Dean Fiala

RockNUG Figurehead
http://www.rocknug.org