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
Hi,

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:

	<log4net>
		<appender name="ConsoleAppender"
type="log4net.Appender.ConsoleAppender" >
			<layout type="log4net.Layout.PatternLayout">
				<param name="ConversionPattern" value="%d
[%t] %-5p %c [%x] - %m%n" />
			</layout>
		</appender>
		<appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender,log4net">
			<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" />
			</layout>
		</appender>
   		<root>
			<level value="DEBUG" />
			<appender-ref ref="ConsoleAppender" />
		</root>
	</log4net>

If I change:

			<appender-ref ref="ConsoleAppender" />

To

			<appender-ref ref=" RollingLogFileAppender " />

Logging works fine to my text file.

Anyone got any ideas?

Thanks, Jerry



Mime
View raw message