I can't get the logging to console (this is called output in Visual Studio 2005 right?) to work. It works for the log file, but not for console.
In web.config I have this:
Code:
<log4net debug="false">
<!-- Define some output appenders -->
<appender name="trace" type="log4net.Appender.TraceAppender, log4net">
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
</layout>
</appender>
<appender name="console" type="log4net.Appender.ConsoleAppender, log4net">
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
</layout>
</appender>
<appender name="rollingFile" type="log4net.Appender.RollingFileAppender,log4net" >
<param name="File" value="log.txt" />
<param name="AppendToFile" value="false" />
<param name="RollingStyle" value="Date" />
<param name="DatePattern" value="yyyy.MM.dd" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
</layout>
</appender>
<!-- Setup the root category, add the appenders and set the default priority -->
<root>
<priority value="ALL" />
<appender-ref ref="rollingFile" />
<appender-ref ref="console" />
</root>
<logger name="NHibernate.Cache">
<level value="DEBUG" />
</logger>
<logger name="NHibernate.Impl.BatcherImpl">
<level value="WARN" />
</logger>
<logger name="NHibernate.SQL">
<level value="ALL" />
</logger>
</log4net>
In Application_Start I have:
log4net.Config.XmlConfigurator.Configure();
What do I do wrong?
/Carl