Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

log4net rollingfileappender c#

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <log4net>
    <root>
      <level value="ALL"/>
      <appender-ref ref="console"/>
      <appender-ref ref="file"/>
      <appender-ref ref="fatal_file"/>
    </root>
    <appender name="console" type="log4net.Appender.ConsoleAppender">
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date %level %logger - %message%newline" />
      </layout>
    </appender>
    <appender name="file" type="log4net.Appender.RollingFileAppender">
      <file value="logapp.log" />
      <appendToFile value="true" />
      <rollingStyle value="Size" />
      <maxSizeRollBackups value="5" />
      <maximumFileSize value="100MB" />
      <staticLogFileName value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %level %logger - %message%newline" />
      </layout>
    </appender>
    <appender name="fatal_file" type="log4net.Appender.RollingFileAppender">
      <file value="logfatal.log" />
      <appendToFile value="true" />
      <rollingStyle value="Size" />
      <maxSizeRollBackups value="5" />
      <maximumFileSize value="100MB" />
      <staticLogFileName value="true" />
      <filter type="log4net.Filter.LevelRangeFilter">
        <param name="LevelMin" value="FATAL" />
        <param name="LevelMax" value="FATAL" />
      </filter>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %level %logger - %message%newline" />
      </layout>
    </appender>
  </log4net>
</configuration>
Comment

PREVIOUS NEXT
Code Example
Csharp :: satisfactory controller support 
Csharp :: create cursor in netezza 
Csharp :: How to convert output of HttpClient PostAsJsonAsync() into user defined list of object 
Csharp :: c# async rethrow exception 
Csharp :: material.icons for wpf 
Csharp :: c# get app FileVersion 
Csharp :: how to convert command line argument to int in C# 
Csharp :: how to get variable value in properties file in inspector unity 
Csharp :: C# console out restore 
Csharp :: button pervious for picturebox c# 
Csharp :: unity matchinfo 
Csharp :: how to check if every element in array is true c# 
Csharp :: c# if a new program is started 
Csharp :: In ASP.NET Core how check if request is local 
Csharp :: An unhandled exception occurred during the execution of the current web request 
Csharp :: pem file string reader c# 
Csharp :: c# printwindow chrome 
Csharp :: C# devexpress get foucused dataRow of child gridView 
Csharp :: unity c# store gameobject in array 
Csharp :: how to create more accurate searching c# 
Csharp :: ilist validation wpf mvvm 
Csharp :: how to close a popup wpf c# on click event 
Csharp :: Delegate with parameter and return 
Csharp :: init stirng list c# 
Csharp :: how to if i enter 1 go to this program C# 
Csharp :: photon2 what is a stream 
Csharp :: unity screentoworldpoint 
Csharp :: Maximum Sum of Non-Adjacent Elements 
Csharp :: app rating within game in unity 
Csharp :: how to print a variable in c# 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =