SHARE
TWEET

Untitled

a guest Oct 10th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Configuration status="error" monitorInterval="5"> <!-- status:error mean ONLY show log4j kernel's error log in console-->
  3.     <Properties>
  4.         <Property name="APP_LOG_ROOT">logs</Property>
  5.     </Properties>
  6.  
  7.  
  8.     <Appenders>
  9.         <Console name="Console" target="SYSTEM_OUT">
  10.             <PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n" />
  11.         </Console>
  12.  
  13.         <RollingFile name="successStantionsLogger" fileName="${APP_LOG_ROOT}/successStantionsLogger.log" filePattern="${APP_LOG_ROOT}/successStantionsLogger-%d{yyyy-MM-dd}.log">
  14.             <!-- Except Error -->
  15.             <ThresholdFilter level="error" onMatch="DENY" onMismatch="ACCEPT"/>
  16.             <PatternLayout>
  17.                 <pattern>%d{yyy-MM-dd HH:mm:ss.SSS} [%t] %level %logger{36} - %msg%n</pattern>
  18.             </PatternLayout>
  19.             <Policies>
  20.                 <TimeBasedTriggeringPolicy interval="1" modulate="true" />
  21.             </Policies>
  22.         </RollingFile>
  23.  
  24.         <RollingFile name="mistakeStantionsLogger" fileName="${APP_LOG_ROOT}/mistakeStantionsLogger.log" filePattern="${APP_LOG_ROOT}/mistakeStantionsLogger-%d{yyyy-MM-dd}.log">
  25.             <!-- Except Error -->
  26.             <ThresholdFilter level="error" onMatch="DENY" onMismatch="ACCEPT"/>
  27.             <PatternLayout>
  28.                 <pattern>%d{yyy-MM-dd HH:mm:ss.SSS} [%t] %level %logger{36} - %msg%n</pattern>
  29.             </PatternLayout>
  30.             <Policies>
  31.                 <TimeBasedTriggeringPolicy interval="1" modulate="true" />
  32.             </Policies>
  33.         </RollingFile>
  34.  
  35.         <RollingFile name="errorLogger" fileName="${APP_LOG_ROOT}/error.log" filePattern="${APP_LOG_ROOT}/error-%d{yyyy-MM-dd}.log">
  36.             <PatternLayout>
  37.                 <pattern>%d{yyy-MM-dd HH:mm:ss.SSS} [%t] %level %logger{36} - %msg%n</pattern>
  38.             </PatternLayout>
  39.             <Policies>
  40.                 <TimeBasedTriggeringPolicy interval="1" modulate="true" />
  41.             </Policies>
  42.         </RollingFile>
  43.     </Appenders>
  44.  
  45.  
  46.     <Loggers>
  47.         <Root level="trace" >
  48.             <AppenderRef ref="Console" level="trace" />
  49.             <AppenderRef ref="successStantionsLogger" level="info" />
  50.             <AppenderRef ref="mistakeStantionsLogger" level="info" />
  51.             <AppenderRef ref="errorLogger" level="error" />
  52.         </Root>
  53.     </Loggers>
  54. </Configuration>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top