logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piyush Arya <arya.piy...@gmail.com>
Subject Re: Specifying a specific folder for log files.
Date Tue, 29 Nov 2005 03:17:19 GMT
Surprisingly enough, I've tried that thing out as well. But still its
generating the file in the bin. I tried expecting log4net to create
the log folder itself as well as explicitly having the folder created
before calling the logger.
It is still creating the file at the bin level. Any more inputs?

On 11/29/05, Secules, Christopher T [AMSRD-AAR-AEF-A]
<chris.secules@us.army.mil> wrote:
> 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