logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Secules, Christopher T [AMSRD-AAR-AEF-A]" <chris.secu...@us.army.mil>
Subject RE: Specifying a specific folder for log files.
Date Mon, 28 Nov 2005 18:43:51 GMT
You need to escape the back slash.  For example:

<param name="File" value="..\\Log\\Error.log"/>

Chris


-----Original Message-----
From: Piyush Arya [mailto:arya.piyush@gmail.com] 
Sent: Monday, November 28, 2005 6:27 AM
To: Log4NET Dev
Subject: Specifying a specific folder for log files.


I have been using the following configuration successfully for some time
now.

<appender name="ErrorRollingFileAppender"
type="log4net.Appender.RollingFileAppender">
<param name="File" value="Error.log" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="10" />
<param name="MaximumFileSize" value="500000" />
<param name="RollingStyle" value="Size" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%n %d %-5p - %m%n" /> </layout>
</appender>

However, if i need to specify the log files to be placed in a separate
folder, lets say, Log, I tried doing:

<param name="File" value="../Log/Error.log" />

This stillplaced the error.log file in the bin folder.

How do i get the file to be placed in a separate folder?

Thanks and Regards,
Piyush Arya

Mime
View raw message