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.
----- Original Message -----
Sent: Wednesday, April 19, 2006 11:00 AM
Subject: Re: logging stops under wwwroot

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

 



 
On 4/19/06, Matthew Brown <[EMAIL PROTECTED]> wrote:
Can you share your logging configuration?


On 4/19/06, ruchika baruah <[EMAIL PROTECTED] > wrote:
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


Reply via email to