diff options
Diffstat (limited to 'warehouse/src/main/resources/config/log4j.xml')
-rw-r--r-- | warehouse/src/main/resources/config/log4j.xml | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/warehouse/src/main/resources/config/log4j.xml b/warehouse/src/main/resources/config/log4j.xml new file mode 100644 index 0000000..e7cdd75 --- /dev/null +++ b/warehouse/src/main/resources/config/log4j.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd"> +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> + <context:property-placeholder location="classpath*:properties.properties" /> + <!-- [STDOUT] --> + <appender name="console" class="org.apache.log4j.ConsoleAppender"> + <param name="encoding" value="UTF-8" /> + <param name="target" value="System.out" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%-5p %c{2} - %m%n" /> + </layout> + </appender> + + <!-- [Default Appender] --> + <appender name="DEFAULT-APPENDER" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="File" value="${log_web_common_default}" /> + <param name="threshold" value="info" /> + <param name="Append" value="true" /> + <param name="encoding" value="UTF-8" /> + <param name="DatePattern" value="'.'yyyy-MM-dd'.log'" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p %c{2} - %m%n" /> + </layout> + </appender> + + <!-- [Console Appender] --> + <appender name="CONSOLE-APPENDER" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="File" value="${log_web_console_default}" /> + <param name="threshold" value="debug" /> + <param name="Append" value="true" /> + <param name="encoding" value="UTF-8" /> + <param name="DatePattern" value="'.'yyyy-MM-dd'.log'" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p %c{2} - %m%n" /> + </layout> + </appender> + + <!-- [Error Appender] --> + <appender name="ERROR-APPENDER" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="File" value="${log_web_common_error}" /> + <param name="threshold" value="error" /> + <param name="Append" value="true" /> + <param name="encoding" value="UTF-8" /> + <param name="DatePattern" value="'.'yyyy-MM-dd'.log'" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p %c{2} - %m%n" /> + </layout> + </appender> + + <!-- [Component APPENDER] --> + <appender name="COMPONENT-APPENDER" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="File" value="${log_web_logistics_component}" /> + <param name="Append" value="true" /> + <param name="encoding" value="UTF-8" /> + <param name="DatePattern" value="'.'yyyy-MM-dd'.log'" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p %c{2} - %m%n" /> + </layout> + </appender> + + <!-- [Component logger] --> + <logger name="LOGISTICS-COMPONENT"> + <level value="debug" /> + <appender-ref ref="console" /> + <appender-ref ref="COMPONENT-APPENDER" /> + <appender-ref ref="ERROR-APPENDER" /> + </logger> + + <!-- Root Logger --> + <root> + <level value="debug"></level> + <appender-ref ref="console" /> + <appender-ref ref="DEFAULT-APPENDER" /> + <appender-ref ref="CONSOLE-APPENDER" /> + <appender-ref ref="ERROR-APPENDER" /> + </root> +</log4j:configuration>
\ No newline at end of file |