Created
August 9, 2017 16:14
-
-
Save hkarakose/af67bb2ae553a4db1df7d41525b7cab1 to your computer and use it in GitHub Desktop.
Log4j Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> | |
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender"> | |
<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler"/> | |
<param name="File" value="/var/log/tomcat7/chat.log"/> | |
<param name="Append" value="true"/> | |
<param name="Threshold" value="INFO"/> | |
<param name="DatePattern" value="'.'yyyy-MM-dd-a"/> | |
<layout class="org.apache.log4j.PatternLayout"> | |
<param name="ConversionPattern" value="%d %-5p [%c] %m%n"/> | |
</layout> | |
</appender> | |
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> | |
<param name="Target" value="System.out"/> | |
<layout class="org.apache.log4j.PatternLayout"> | |
<param name="ConversionPattern" value="%d %5p [%X{sessionId}] %c{1} - %m%n"/> | |
</layout> | |
</appender> | |
<root> | |
<!--<appender-ref ref="FILE"/>--> | |
<appender-ref ref="CONSOLE"/> | |
</root> | |
</log4j:configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment