logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerry Shea" <jerry_maxt...@hotmail.com>
Subject nothing appearing on ConsoleAppender in web application
Date Sun, 12 Dec 2004 21:18:22 GMT

I have setup log4net in an ASP.NET application. Logging works perfectly if I
use a RollingFileAppender but if I use the ConsoleAppender, output does not
appear in the console when running in the debugger (VS.NET 2003). 

I am configuring log4net with: 
  [assembly: log4net.Config.DOMConfigurator(Watch=true)]

And my web.config looks like this:

		<appender name="ConsoleAppender"
type="log4net.Appender.ConsoleAppender" >
			<layout type="log4net.Layout.PatternLayout">
				<param name="ConversionPattern" value="%d
[%t] %-5p %c [%x] - %m%n" />
		<appender name="RollingLogFileAppender"
			<param name="File" value="log.txt" />
			<param name="AppendToFile" value="true" />
			<layout type="log4net.Layout.PatternLayout,log4net">
				<param name="ConversionPattern" value="%d
[%t] %-5p %c [%x] - %m%n" />
			<level value="DEBUG" />
			<appender-ref ref="ConsoleAppender" />

If I change:

			<appender-ref ref="ConsoleAppender" />


			<appender-ref ref=" RollingLogFileAppender " />

Logging works fine to my text file.

Anyone got any ideas?

Thanks, Jerry

View raw message