Hi,
I've a ASP.NET project with log4net used. This project has 2 references
in the same solution to 2 Class Library Projects. I use also a dll
reference to Nhibernate framework (http://www.nhibernate.org ). All
theses three projects use also log4net and have their configuration in
App.config files.
What I want ? See debug information in the debug window inside Visual
Studio 2003.
I've put this in configuration file of the ASP.NET application :
<log4net debug="true">
<!-- Define some output appenders -->
<appender name="rollingFile"
type="log4net.Appender.RollingFileAppender,log4net" >
<param name="File" value="logReallyWeb.txt" />
<param name="AppendToFile" value="true" />
<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 [%x] <%X{auth}> - %m%n" />
</layout>
</appender>
<appender name="OutputDebugStringAppender"
type="log4net.Appender.OutputDebugStringAppender,log4net" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date
[%thread] %-5level %logger [%ndc] - %message%newline" />
</layout>
</appender>
<!-- Setup the root category, add the appenders and set
the default priority -->
<root>
<priority value="DEBUG" />
<appender-ref ref="OutputDebugStringAppender" />
</root>
</log4net>
When I use RollingFileAppender, I see only the Nhibernate debug
information. When I use OutputDebugStringAppender, there is no message
at all. Maybe I miss some setting in VS ?
Configuration details :
Version of log4net : 1.1.1
Assembly type : Web Project with 2 Class Library Projects referenced
Runtime platform : MS .NET 1.1
Matthieu