Either you strongly restrict the level of your root logger (e.g. ERROR) and
declare a logger for your own classes with DEBUG level:
<logger name="my.company" additivity="false">
<level value="DEBUG"/>
.... (appender-refs)
</logger>
<root>
<level value="ERROR"/>
.... (appender-refs)
</root>
Or you go the other way round, you restrict the library loggers strongly and
configure the root logger to DEBUG:
<logger name="org.springframework" additivity="false">
<level value="WARN"/>
.... (appender-refs)
</logger>
<logger name="org.hibernate" additivity="false">
<level value="ERROR"/>
.... (appender-refs)
</logger>
<logger name="org.hibernate" additivity="false">
<level value="info"/>
.... (appender-refs)
</logger>
<logger name="org" additivity="false">
<level value="info"/>
.... (appender-refs)
</logger>
<root>
<level value="DEBUG"/>
.... (appender-refs)
</root>
-----Ursprüngliche Nachricht-----
Von: Harikrishna Imadabattina
[mailto:[email protected]]
Gesendet: Montag, 9. März 2009 12:58
An: [email protected]
Betreff: [SPAM (Bayesain Analysis)] - How to filter the unnecessary log
messages - Bayesian Filter detected spam
Hi all,
I have implemented log4j and it works well. But the application had
Struts2, Spring,Hibernate,Tiles and other open source components. When I
start the tomcat or run the application the log file gets filled with so
many logs which are there inside jars of these frameworks. Can any one
please let me know how can I filter out those messages and enable only
application specific messages to appear in the log file. Please find the log
pasted below.
Thanks
Harry
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]