views:

468

answers:

3

It's a third party application generating huge amounts of logentries on our appserver. Like this:

[03.03.10 15:21:57:250 CET] 00000180 FtpProtocolHa I org.slf4j.impl.JCLLoggerAdapter info Close connection : 10.227.10.10 - admin
[03.03.10 15:27:35:209 CET] 00000181 MinaFtpProtoc I org.slf4j.impl.JCLLoggerAdapter info [/10.227.10.10] CLOSED
++++

How do I turn this output from slf4j off? I've looked in the .war-file to find some configuration for slf4j but nothing. Their website didn't help either

+1  A: 

slf4j is a logging facade for various logging frameworks. That output comes from the Apache Commons Loggin framework adapter, that turns to be another facade. Commons Logging Configuration.

rodrigoap
+1  A: 

Which logging back-end, e.g. logback, log4j, j.u.l., are you using? You need to configure the backend to filter those messages.

Moreover, the fact that the log messages point to "org.slf4j.impl.JCLLoggerAdapter" indicates that caller location inference is not working correctly. (It should mention the actual caller not JCLLoggerAdapter). This can happen if:

1) you are using an older version of SLF4J

or

2) the caller is using a slf4j-like wrapper or has its own homegrown logging API which does not infer caller location properly. See also a relevant SLF4J FAQ entry.

Ceki
This is a third party application. I don't have access to any code (other than decompiling) There are no log4j.properties files or any other files that look like they containt any log-properties
Tommy
+2  A: 

slf4j is just a funnel to the actual log backend (here overriding jakarta commons logging), which is the one you must configure to get rid of a certain kind of messages. For logback this is the appropriate configuration snippet:

    <!--  No Tomcat debug logs -->
    <logger name="org.apache.catalina.core" level="INFO" />

For log4j it is very similar.

Thorbjørn Ravn Andersen