Commit 4deee50c by ashutoshm

ATLAS-1996: Updated Log4J configuration to limit size of log files.

parent a5d52418
...@@ -27,11 +27,13 @@ ...@@ -27,11 +27,13 @@
</layout> </layout>
</appender> </appender>
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender"> <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${atlas.log.dir}/${atlas.log.file}"/> <param name="File" value="${atlas.log.dir}/${atlas.log.file}"/>
<param name="Append" value="true"/> <param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout"> <layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p - [%t:%x] ~ %m (%C{1}:%L)%n"/> <param name="ConversionPattern" value="%d %-5p - [%t:%x] ~ %m (%C{1}:%L)%n"/>
<param name="maxFileSize" value="100MB" />
<param name="maxBackupIndex" value="20" />
</layout> </layout>
</appender> </appender>
...@@ -42,7 +44,7 @@ ...@@ -42,7 +44,7 @@
</logger> </logger>
<logger name="com.thinkaurelius.titan" additivity="false"> <logger name="com.thinkaurelius.titan" additivity="false">
<level value="info"/> <level value="warn"/>
<appender-ref ref="FILE"/> <appender-ref ref="FILE"/>
</logger> </logger>
......
...@@ -27,35 +27,42 @@ ...@@ -27,35 +27,42 @@
</layout> </layout>
</appender> </appender>
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender"> <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${atlas.log.dir}/${atlas.log.file}"/> <param name="File" value="${atlas.log.dir}/${atlas.log.file}"/>
<param name="Append" value="true"/> <param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout"> <layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p - [%t:%x] ~ %m (%C{1}:%L)%n"/> <param name="ConversionPattern" value="%d %-5p - [%t:%x] ~ %m (%C{1}:%L)%n"/>
<param name="maxFileSize" value="100MB" />
<param name="maxBackupIndex" value="20" />
</layout> </layout>
</appender> </appender>
<appender name="AUDIT" class="org.apache.log4j.DailyRollingFileAppender"> <appender name="AUDIT" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${atlas.log.dir}/audit.log"/> <param name="File" value="${atlas.log.dir}/audit.log"/>
<param name="Append" value="true"/> <param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout"> <layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %x %m%n"/> <param name="ConversionPattern" value="%d %x %m%n"/>
<param name="maxFileSize" value="100MB" />
<param name="maxBackupIndex" value="20" />
</layout> </layout>
</appender> </appender>
<appender name="METRICS" class="org.apache.log4j.DailyRollingFileAppender"> <appender name="METRICS" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${atlas.log.dir}/metric.log"/> <param name="File" value="${atlas.log.dir}/metric.log"/>
<param name="Append" value="true"/> <param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout"> <layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %x %m%n"/> <param name="ConversionPattern" value="%d %x %m%n"/>
<param name="maxFileSize" value="100MB" />
</layout> </layout>
</appender> </appender>
<appender name="FAILED" class="org.apache.log4j.DailyRollingFileAppender"> <appender name="FAILED" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${atlas.log.dir}/failed.log"/> <param name="File" value="${atlas.log.dir}/failed.log"/>
<param name="Append" value="true"/> <param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout"> <layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %m"/> <param name="ConversionPattern" value="%d %m"/>
<param name="maxFileSize" value="100MB" />
<param name="maxBackupIndex" value="20" />
</layout> </layout>
</appender> </appender>
...@@ -82,7 +89,7 @@ ...@@ -82,7 +89,7 @@
</logger> </logger>
<logger name="com.thinkaurelius.titan" additivity="false"> <logger name="com.thinkaurelius.titan" additivity="false">
<level value="info"/> <level value="warn"/>
<appender-ref ref="FILE"/> <appender-ref ref="FILE"/>
</logger> </logger>
......
...@@ -27,12 +27,14 @@ ...@@ -27,12 +27,14 @@
</layout> </layout>
</appender> </appender>
<appender name="AUDIT" class="org.apache.log4j.DailyRollingFileAppender"> <appender name="AUDIT" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${atlas.log.dir}/audit.log"/> <param name="File" value="${atlas.log.dir}/audit.log"/>
<param name="Append" value="true"/> <param name="Append" value="true"/>
<param name="Threshold" value="debug"/> <param name="Threshold" value="debug"/>
<layout class="org.apache.log4j.PatternLayout"> <layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %x %m%n"/> <param name="ConversionPattern" value="%d %x %m%n"/>
<param name="maxFileSize" value="100MB" />
<param name="maxBackupIndex" value="20" />
</layout> </layout>
</appender> </appender>
...@@ -71,7 +73,7 @@ ...@@ -71,7 +73,7 @@
</logger> </logger>
<logger name="com.thinkaurelius.titan" additivity="false"> <logger name="com.thinkaurelius.titan" additivity="false">
<level value="info"/> <level value="warn"/>
<appender-ref ref="console"/> <appender-ref ref="console"/>
</logger> </logger>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment