Matthieu, Visual Studio only captures the OutputDebugString messages from programmes that it starts. ASP.NET debugging is done by attaching to the existing aspnet_wp.exe process. Visual Studio will therefore not hook the OutputDebugString messages from a web application.
You may get the desired behaviour with the TraceAppender. Also it looks like Nhibernate is using log4net 1.2 beta. You may want to use this also as it is higher quality than 1.1.1. Nicko > -----Original Message----- > From: Matthieu Guyonnet-Duluc [mailto:[EMAIL PROTECTED] > Sent: 27 August 2004 21:02 > To: [email protected] > Subject: No debug message in Visual Studio > > 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 > >
