<log4net debug="false">
        <appender name="ConsoleAppender"
type="log4net.Appender.ConsoleAppender">
                <layout type="log4net.Layout.PatternLayout">
                        <param name="ConversionPattern"
value="%d{HH:mm:ss,fff} %-5p %m%n" />
                </layout>
        </appender>

        <appender name="LogFileDebugAppender"
type="log4net.Appender.RollingFileAppender">
                <param name="File" value="Log\\log-debug.txt" />
                <param name="CountDirection" value="1" />
                <param name="AppendToFile" value="true" />
                <param name="MaxSizeRollBackups" value="3" />
                <param name="MaximumFileSize" value="10MB" />
                <param name="RollingStyle" value="Size" />
                <param name="StaticLogFileName" value="true" />         
                <layout type="log4net.Layout.PatternLayout">
                        <param name="ConversionPattern"
value="%d{dd.MM.yy HH:mm:ss} [%t] %-5p %c [%x] %m%n" />
                </layout>
        </appender>     

        <root>
                <level value="ALL" />
                <appender-ref ref="ConsoleAppender" />
                <appender-ref ref="LogFileDebugAppender" />
        </root>
</log4net>

In Internet Information services applet, enable Write access for the log
folder
In Windows Explorer, grant everyone all rights to the log folder.

I also believe you should see log output in Visual Studio's output
window when you enable the console appender above and start your project
from Visual Studio (log output from my web services do this)

I have wrapped calls to log4net in my own logging framework, the
important line is

        log4net.Config.DOMConfigurator.ConfigureAndWatch( new FileInfo(
configFile ) );

Where configFile contains the name of the file containing the XML above
(I'm using a separate configuration file, not web.config)

You may want to try restrict access when you get your solution up and
running. Perhaps you can disable Read access on the folder in Internet
Information Services applet, I haven't tried this though. You should
also avoid granting everyone all rights of course.

Hope this helps.

Dag
 

-----Original Message-----
From: Ronnie Hayden [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 28, 2004 12:24 PM
To: Log4NET User
Subject: RE: Independent FileAppenders

Could you please send me the code, just in case I am doing something
wrong.

Thanks,

Ron.

[snip]

Reply via email to