-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: How do I make logging play nice with ASP.NET?
PostPosted: Fri Oct 28, 2005 3:31 pm 
Newbie

Joined: Fri Oct 28, 2005 3:27 pm
Posts: 2
I put log4net.dll into the global assembly cache, because it's just easier that way.

Here is the complete listing of my Web.config. Relevant excerpts below:

Code:
   <log4net debug="true">
      <appender name="rollingFile" type="log4net.Appender.RollingFileAppender,log4net">
         <param name="File" value="/var/www/zapocalypse/log.txt" />
         <param name="AppendToFile" value="true" />
         <param name="RollingStyle" value="Date" />
         <param name="DatePattern" value="yyyy.MM.dd" />
         <param name="StaticLogFileName" value="true" />
         <param name="CountDirection" value="1" />
         <layout type="log4net.Layout.PatternLayout,log4net">
            <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] &lt;%X{auth}&gt; - %m%n" />
         </layout>
      </appender>
      
      <root>
         <priority value="ALL" />
         <appender-ref ref="rollingFile" />
      </root>
   </log4net>


How can I tell whether log4net is successfully parsing the configuration data in Web.config?

What are some possible reasons that it would fail to work?

Is NHibernate just very, very quiet in its logs?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2005 5:44 pm 
Newbie

Joined: Fri Oct 28, 2005 3:27 pm
Posts: 2
Oh, jeeze, I feel stupid.

log4net won't read any configuration data until you call log4net.Config.XmlConfigurator.Configure().


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.