logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Annette S√ľndermann <suenderm...@sycada.com>
Subject Exception Logging
Date Wed, 08 Dec 2004 14:24:44 GMT
I am using log4net 1.2.0 beta 8.

According to the documentation, the following code:

this.logger.Error ( "exception observed!", new Exception("I am an Exception") );


'Log a message object with the ERROR level including the stack trace of the Exception passed
as a parameter.'

On my logfile, I only find the following text:

2004-12-08 15:21:51,171 ERROR FormPoc.Form1_Load[376]
exception observed!
Exception: System.Exception
Message: I am an Exception

No StackTrace is logged.

My log4net configuration is:
		<!-- Define a Rolling File Appender -->
		<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
			<param name="File" value="G:/MTraceReports/MReport/log/Poc.log"/>
			<param name="AppendToFile" value="true"/>
			<param name="RollingStyle" value="Size"/>
			<param name="MaxSizeRollBackups" value="10"/>
			<param name="MaximumFileSize" value="1MB"/>
			<param name="StaticLogFileName" value="true"/>
			<layout type="log4net.Layout.PatternLayout">
				<param name="ConversionPattern" value="%d{ISO8601} %-5p %C{1}.%M[%L]%n%m%n"/>
		<!-- Set root logger level to DEBUG and add the RollingFileAppender -->
			<level value="ALL"/>
			<appender-ref ref="RollingFileAppender"/>

What is the reason for the missing StackTrace?

View raw message