Introduction
This document describes how to filter osmosix.log file to show only certain level of messages.
Filter WARNING/DEBUG/INFO Messages from the Osmosix.log File
Open /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/log4j.xml and add the bold section inside the area that starts with appender name="ROLLING":
<appender name="ROLLING" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${catalina.base}/logs/osmosix.log"/>
<param name="Append" value="true"/>
<param name="MaxFileSize" value="10MB"/>
<param name="MaxBackupIndex" value="9"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="VENDOR_ID::%X{VENDOR_ID}::USER_ID::%X{USER_ID}::%d{ISO8601} %-5p %-15c{2} [%t] %x - %m%n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelMatchFilter">
<param name="LevelToMatch" value="WARN"/>
<param name="AcceptOnMatch" value="false"/>
</filter>
</appender>
Restart tomcat service once changed. # /etc/init.d/tomcat restart
Note: On 4.4 version and above no restarting of tomcat service required.