2
votes

I keep getting info messages in my log files.

Im' using jetty and spring.

INFO org.springframework.remoting.support.RemoteInvocationTraceInterceptor - Processing of HessianServiceExporter remote call resulted in exception...

I didn't get the messages on tomcat. Is there a way to turn these message's off?

I'm using log4j slf4j and commons logging too.

When I debug log4j the correct config file is getting loaded.

Somehow another logging is adding these messages to the file...

I think because spring uses commons logging it makes info messages with RemoteInvocationTraceInterceptor.

Somehow commons logging doesn't send it to log4j and just writes info no matter what you set in log4j.xml.

3

3 Answers

0
votes

Try to filter/remove org.springframework.remoting.support.RemoteInvocationTraceInterceptor from your

0
votes

You can turn off INFO level log for spring by specifying the following in log4j.properties

log4j.logger.org.springframework.remoting.support=ERROR

All the classes under support package write only error log. If you need entire springframework, specify like

log4j.logger.org.springframework=ERROR
0
votes

Spring uses a strange pattern (imho) with log4j:

For exemple, in class "MyClass", they don't write (which is usual):

logger=LogFactory.getLog(MyClass.class);

but they write

logger=LogFactory.getLog(getClass());

So if a derived class "MyDerived extends MyClass" uses a method of its parent class "MyClass", the call will be filtered by log4j according to the class "MyDerived", not "MyClass", which is not intuitive, since the call is in the file 'MyClass.java'

So you can filter it in that case with

<logger name="MyDerived" additivity="false">
    <level value="fatal" />
</logger>

or (in .properties format) log4j.logger.MyDerived=ERROR