logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Collier, Mike" <Mike_Coll...@stercomm.com>
Subject RE: Log an Exception
Date Tue, 14 Dec 2004 14:57:32 GMT
Yes, you are correct.  I looked at my code again and realized I didn't
have an a exception that would have stack trace information.

Now that I have the stack trace information, is there a way to break it
out into a separate field (other than the message field)?  Or, is the
exception information always considered part of the log message?


-----Original Message-----
From: Ron Grabowski [mailto:rongrabowski@yahoo.com] 
Sent: Monday, December 13, 2004 8:50 PM
To: Log4NET User
Subject: Re: Log an Exception

%m baiscally calls ToString() on the exception. Are you sure you
exception contains stack information.

--- "Collier, Mike" <Mike_Collier@stercomm.com> wrote:

> I apologize if you get this message twice.  I originally sent it to 
> the old Sourceforge.net list before I realized it was closed.
> ------------------
> How would I log an exception (type, message, and stack trace) using, 
> for example, the ConsoleAppender or FileAppender?  It seems that the 
> "%m"
> conversion character in PatternLayout prints my log message, and the 
> exception type and message, but not the stack trace.  I see that the 
> ExceptionLayout prints out the exception information.  I don't see a 
> way to use the ExceptionLayout with appenders like the 
> ConsoleAppender.
> I
> could use the ExceptionLayout with the ADONetAppender though.
> Do I need to implement my own conversion character?
> I'm using Log4NET 1.2.0 beta 8.
> Thanks!

View raw message