Getting teh Exception in a Filter
<[email protected]> Tue, 14 Dec 2004 12:31:54 -0000
| Newsgroups | gmane.comp.windows.dotnet.log4net.user |
|---|---|
| Message-ID | <[email protected]> |
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? Cheers, Bill =20 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 charit= y, who offer vital services and emotional support at a particularly vulnera= ble time of the year. UK businesses use 2 million tonnes of paper each year. THINK before you PRINT this email. ______________________________________________________________ CONFIDENTIALITY NOTICE This communication and the information it contains is intended for the pers= on or organisation to=20 whom it is addressed. Its contents are confidential and may be protected i= n law. Unauthorised use, copying or disclosure of any of it may be unlawful. If you are not the in= tended recipient, please=20 contact us immediately. The contents of any attachments in this e-mail may contain software viruses= , which could damage your=20 own computer system. While Marlborough Stirling has taken every reasonable= precaution to minimise=20 this risk, we cannot accept liability for any damage, which you sustain as = a result of software=20 viruses. You should carry out your own virus checking procedure before ope= ning any attachment. Marlborough Stirling plc, Registered in England and Wales=20 Registered No. 3008820, Jessop House, Jessop Avenue, Cheltenham, Gloucestershire, GL50 3SH Tel: 01242 547000 Fax: 01242 547100 http://www.marlborough-stirling.com ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/