logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bender Heri" <HBen...@Ergonomics.ch>
Subject AW: How to filter the unnecessary log messages
Date Mon, 09 Mar 2009 13:35:51 GMT
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:harikrishna.imadabattina@techendeavour.com] 
Gesendet: Montag, 9. März 2009 12:58
An: log4j-user@logging.apache.org
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: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message