.net core log 4 net構成



<log4net>
  <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender" >
    <file value="App_Data/Logs/Logs.txt" />
    <appendToFile value="true" />
    <rollingStyle value="Size" />
    <maxSizeRollBackups value="10" />
    <maximumFileSize value="10000KB" />
    <staticLogFileName value="true" />
    
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value=" 【  】:%d%n 【  】:%p%n 【  】:%c%n 【  ID】: %thread %n 【    】:%m%n 【    】:%exception %n---------------------------------------------------------------------------------------------------------------%n"/>
    layout>
    
    <filter type="log4net.Filter.LevelRangeFilter">
      <levelMin value="INFO" />
      <levelMax value="ERROR" />
    filter>
    
    
  appender>
  
  <root>
    <appender-ref ref="RollingFileAppender" />
    <level value="DEBUG" />
  root>
  <logger name="NHibernate">
    <level value="WARN" />
  logger>
log4net>