logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Bill.Mar...@Marlborough-Stirling.com>
Subject Getting the exception in a filter
Date Tue, 14 Dec 2004 12:37:20 GMT
I need to be able to ignore specific exceptions in log4net from within the
config file (specifically, the ThreadAbortException).  I can't see any way
of doing this with the existing functionality, so was going to write a
custom filter to do it.  It would appear, however, that I can't get the
Exception object of the LoggingEvent object passed in to the Decide method.
I can get a rendered version of it from the GetExceptionStrRep method, but I
would consider this as unreliable as I cannot guarantee how the exception
will be rendered.

Anyone know a way of getting the underlying exception?



We would like to take this opportunity to offer seasons greetings from all at Marlborough
Stirling. Rather than sending out Christmas cards this year, we will be making a contribution
to the charity Crisis - www.crisis.org.uk. We are delighted to be able to support the work
of this worthwhile charity, who offer vital services and emotional support at a particularly
vulnerable time of the year.

UK businesses use 2 million tonnes of paper each year.
THINK before you PRINT this email.


This communication and the information it contains is intended for the person or organisation
whom it is addressed.  Its contents are confidential and may be protected in law.  Unauthorised
 copying or disclosure of any of it may be unlawful.  If you are not the intended recipient,
contact us immediately.

The contents of any attachments in this e-mail may contain software viruses, which could damage
own computer system.  While Marlborough Stirling has taken every reasonable precaution to
this risk, we cannot accept liability for any damage, which you sustain as a result of software

viruses.  You should carry out your own virus checking procedure before opening any attachment.

Marlborough Stirling plc, Registered in England and Wales 
Registered No. 3008820,
Jessop House, Jessop Avenue, Cheltenham, Gloucestershire, GL50 3SH
Tel: 01242 547000     Fax: 01242 547100

View raw message