1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
   | <?xml version="1.0" encoding="UTF-8"?> <configuration status="OFF">
      <properties>         
          <property name="LOG_LEVEL">INFO</property>                  <property name="APP_NAME" value="framework-project"/>                  <property name="LOG_HOME">./logs/</property>                  <property name="LOG_MAX_HISTORY" value="60d"/>                  <property name="LOG_MAX_FILE_SIZE" value="10 MB"/>                  <property name="LOG_TOTAL_NUMBER_DAILY" value="10"/>                  <property name="ARCHIVE_FILE_SUFFIX" value="zip"/>                  <property name="LOG_FILE_NAME" value="${LOG_HOME}"/>         <property name="FILE_NAME_PATTERN" value="${LOG_HOME}%d{yyyy-MM-dd}"/>
          
 
 
 
 
 
 
 
 
 
 
 
 
 
          
 
 
 
 
 
                   <property name="ENCODER_PATTERN_CONSOLE">%blue{%d{yyyy-MM-dd HH:mm:ss.SSS}} | %highlight{%-5level}{ERROR=Bright RED, WARN=Bright Yellow, INFO=Bright Green, DEBUG=Bright Cyan, TRACE=Bright White} | %yellow{%t} | %cyan{%c{1.}}  : %white{%msg%n}</property>                  <property name="ENCODER_PATTERN">%d{yyyy-MM-dd HH:mm:ss.SSS}  %-5level %5pid --- [%15.15t] %c{1.} [%L] : %m%n</property>                  <property name="DEFAULT_PATTERN">%d{yyyy-MM-dd HH:mm:ss.SSS}  %highlight{%-5level} %style{%5pid}{bright,magenta} --- [%15.15t] %cyan{%c{1.} [%L]} : %m%n</property>     </properties>
      <Appenders>                  <Console name="Console" target="SYSTEM_OUT">                          <PatternLayout pattern="${DEFAULT_PATTERN}" />         </Console>                  <RollingFile name="RollingFileAll" fileName="${LOG_FILE_NAME}/${date:yyyy-MM-dd}/info.log" filePattern="${FILE_NAME_PATTERN}/info.log">                          <ThresholdFilter level="${LOG_LEVEL}" onMatch="ACCEPT" onMismatch="DENY" />                          <PatternLayout pattern="${ENCODER_PATTERN}" />             <Policies>                                  <TimeBasedTriggeringPolicy />                                  <SizeBasedTriggeringPolicy size="${LOG_MAX_FILE_SIZE}" />             </Policies>                          <DefaultRolloverStrategy compressionLevel="9" max="${LOG_TOTAL_NUMBER_DAILY}">                 <Delete basePath="${LOG_HOME}" maxDepth="1">                     <IfFileName glob=".info.*.log" />                     <IfLastModified age="${LOG_MAX_HISTORY}" />                 </Delete>             </DefaultRolloverStrategy>         </RollingFile>
          <RollingFile name="RollingFileDebug"                      fileName="${LOG_FILE_NAME}/${date:yyyy-MM-dd}/debug.log"                      filePattern="${FILE_NAME_PATTERN}/debug.log">             <Filters>                 <ThresholdFilter level="DEBUG" />                 <ThresholdFilter level="INFO" onMatch="DENY"                                  onMismatch="NEUTRAL" />             </Filters>             <PatternLayout pattern="${ENCODER_PATTERN}" />             <Policies>                                  <TimeBasedTriggeringPolicy />                                  <SizeBasedTriggeringPolicy size="${LOG_MAX_FILE_SIZE}" />             </Policies>                          <DefaultRolloverStrategy compressionLevel="9"                                      max="${LOG_TOTAL_NUMBER_DAILY}">                 <Delete basePath="${LOG_HOME}" maxDepth="1">                     <IfFileName glob="*.debug.*.log" />                     <IfLastModified age="${LOG_MAX_HISTORY}" />                 </Delete>             </DefaultRolloverStrategy>         </RollingFile>
          <RollingFile name="RollingFileWarn" fileName="${LOG_FILE_NAME}/${date:yyyy-MM-dd}/warn.log"                      filePattern="${FILE_NAME_PATTERN}.warn.log">             <Filters>                 <ThresholdFilter level="WARN" />                 <ThresholdFilter level="ERROR" onMatch="DENY"                                  onMismatch="NEUTRAL" />             </Filters>             <PatternLayout pattern="${ENCODER_PATTERN}" />             <Policies>                                  <TimeBasedTriggeringPolicy />                                  <SizeBasedTriggeringPolicy size="${LOG_MAX_FILE_SIZE}" />             </Policies>                          <DefaultRolloverStrategy compressionLevel="9"                                      max="${LOG_TOTAL_NUMBER_DAILY}">                 <Delete basePath="${LOG_HOME}" maxDepth="1">                     <IfFileName glob="*.warn.*.log" />                     <IfLastModified age="${LOG_MAX_HISTORY}" />                 </Delete>             </DefaultRolloverStrategy>         </RollingFile>
          <RollingFile name="RollingFileError"                      fileName="${LOG_FILE_NAME}/${date:yyyy-MM-dd}/error.log"                      filePattern="${FILE_NAME_PATTERN}.error.log">             <Filters>                 <ThresholdFilter level="ERROR" />             </Filters>             <PatternLayout pattern="${ENCODER_PATTERN}" />             <Policies>                 <TimeBasedTriggeringPolicy />                 <SizeBasedTriggeringPolicy size="${LOG_MAX_FILE_SIZE}" />             </Policies>             <DefaultRolloverStrategy compressionLevel="9"   max="${LOG_TOTAL_NUMBER_DAILY}">                 <Delete basePath="${LOG_HOME}" maxDepth="1">                     <IfFileName glob="*.error.*.log" />                     <IfLastModified age="${LOG_MAX_HISTORY}" />                 </Delete>             </DefaultRolloverStrategy>         </RollingFile>     </Appenders>
      
      <Loggers>                  <Logger name="com.example" level="debug" additivity="false">             <AppenderRef ref="Console"/>             <AppenderRef ref="RollingFileAll"/>             <AppenderRef ref="RollingFileDebug"/>             <AppenderRef ref="RollingFileWarn"/>             <AppenderRef ref="RollingFileError"/>         </Logger>         <root level="${LOG_LEVEL}">             <appender-ref ref="Console"/>             <appender-ref ref="RollingFileAll"/>             <appender-ref ref="RollingFileDebug"/>             <appender-ref ref="RollingFileWarn"/>             <appender-ref ref="RollingFileError"/>         </root>     </Loggers> </configuration>
   |