logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Georg Jansen" <Georg.Jan...@FaktNet.com>
Subject RE: Specifying a specific folder for log files.
Date Tue, 29 Nov 2005 17:49:40 GMT
Piyush,

 

I have successfully used the configuration listed below: 

 

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

   <file value="..\\..\\Error.Log"/>

   <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />


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

      <conversionPattern value="%date [%thread] %-5level %logger [%ndc] -
%message%newline"/>

   </layout>

   <appendToFile value="true" />

   <rollingStyle value="Size" />

   <maxSizeRollBackups value="10" />

   <maximumFileSize value="100KB" />

   <staticLogFileName value="true" />

</appender>

 

The only difference I can se from your configuration to mine is that in your
configuration the file is specified as:

 

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

 

While in my configuration the file is specified as:

 

<file value="..\\Log\\Error.log"/>

 

I tried to switch to your configuration, and that works as well, so this is
probably no answer to your issue, but only a confirmation that the
configuration you are trying, is working in my environment.

 

The new config section (in app.config) after I switched to your
configuration is listed below:

 

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

   <param name="File" value="..\\Log\\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>

 

Best regards

Georg

http://www.l4ndash.com <http://www.l4ndash.com/>  - Log4Net Dashboard / Log
Viewer

 


Mime
View raw message