Friday, May 18, 2012
 
The best way to analyze your logs! Minimize
 Log4Net Mail archive   

The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.

Subject: logging stops under wwwroot
Prev Next
You are not authorized to post a reply.

Author Messages
ruchika baruah

04/19/2006 6:39 AM  
Hi
   I am having a problem with Log4net. I am using log4net 1.2.0.  I have a asp.net , c# web application running in  windows2000 server. When the application is placed in any folder and created a virtual directory in IIS , it works fine- log file is created (ie . file appender works fine). but if I place the application under c:\inetpub\wwwroot, it stops logging to the file. I have given full permission to aspnet, network service user for that log folder. Although, trace appender still works.
Can somebody pls help me.
thanks
Ruchika
Matthew Brown

04/19/2006 4:41 PM  
Can you share your logging configuration?

ruchika baruah

04/19/2006 6:00 PM  
Thanks Matthew,
here is the configuration
 

<

configuration><configSections >

<section name="log4net" type="System.Configuration.IgnoreSectionHandler" />

<appSettings></appSettings ><add key="log4net.Internal.Debug " value="true"/>

</appSettings>

<

system.diagnostics><trace autoflush="true"><listeners ><add name="textWriterTraceListener"

type="System.Diagnostics.TextWriterTraceListener" initializeData ="C:\tmp\log4net.txt" /></ listeners></trace>

</system.diagnostics></ configSections>

<log4net>

<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">

<param name="File" value="C:\\Inetpub\\wwwroot\\WebApplication2\\Log\\test.log" />

<!--<param name="File" value="Log\test.log" />-->

<param name="AppendToFile" value="true" />

<param name="MaxSizeRollBackups" value="10" />

<param name="MaximumFileSize" value="10MB" />

<param name="RollingStyle" value="Size" />

<param name="StaticLogFileName" value="true" />

<layout type="log4net.Layout.PatternLayout ">

<param name="Header" value="\r\n\r\n---------------------------------------------\r\n" />

<param name="Footer" value="\r\n---------------------------------------------\r\n\r\n" />

<param name="ConversionPattern" value="%d [%t] %-5p - %m%n" />

</layout>

</appender>

<root>

<level value="ALL" />

<appender-ref ref="RollingLogFileAppender" />

<!--<appender-ref ref="ColoredConsoleAppender" />-->

</root>

</log4net>

</

configuration>

-Ruchika

 

Hollywood

04/19/2006 7:08 PM  
I'd change the <param name="File" value="......"> to be <param name="File" value="Log\\test.log"/>.  And make sure the Log directory is created under your WebApplication2 and has read/write permissions for the account that IIS is running under, probably the Local Service or Network Service account  This is assuming that the applciation that is logging is WebApplication2.  I've done this for IIS on XP, Win2000 and 2003 Server.
Nicko Cadell

04/23/2006 11:12 PM  

There is a known issue with old versions of log4net FileAppender where
it tries to create the log folder even if it exists. This fails if the
credentials don't allow creating the folder, even if the folder already
exists. This may be causing the problem you are seeing. To verify make
sure that you grant the appropriate user full permissions on the log
folder and all parent folders.

This issue is fixed in the latest version of log4net - please retry this
with 1.2.10.

Cheers,
Nicko

You are not authorized to post a reply.
Forums > Log4Net > Log4Net Mail archive > logging stops under wwwroot



ActiveForums 3.7

 

 

 

 

 

 

 

 

Log4Net Dashboard

Log analysis and monitoring made easy!

Log4Net Dashboard is a log viewer that can read log statements from a variety of logging output targets.

You can download a free developer version.

  

Check it out!

On the demonstration site you can try it  with live data.demo.l4ndash.com - Try Log4Net Dashboard with live data

The mail archive is a copy of all the mail sent to the mail address: log4net-user@logging.apache.org, organized as a forum.

If you would like to participate in the mail list, send a mail to log4net-user-subscribe@logging.apache.org.

More information about the mailing list is available on: http://logging.apache.org/log4net/support.html

 

A complete topic list is available and can be viewed here (warning, it takes some time to load)

 

Copyright 2005-2008 by FaktNet AS Terms Of Use Privacy Statement