Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I turn off extra logging?

I have a Java service that uses Spring and CXF. The code is from a previous developer and I'm providing maintenance, but I'm seeing this in the logs

 --------------------------------------
 Apr 16, 2013 1:44:11 PM org.apache.cxf.interceptor.AbstractLoggingInterceptor log
 INFO: Inbound Message
 ----------------------------
 ID: 33
 Address: /MyApplication/endpoint
 Encoding: UTF-8
 Http-Method: POST
 Content-Type: application/x-www-form-urlencoded
 Headers: {content-type=[application/x-www-form-urlencoded], connection=[close], host=     [localhost:8080], Content-Length=[11504], user-agent=[Apache-HttpClient/4.2.3 (java 1.5)], Content-Type=[application/x-www-form-urlencoded]}
 Payload: {
"events" :
[ { event }, { event }, ... ]
 }

And we have too many events, and the log is becoming unmanageable. Is there a way I can turn off this logging? These log calls are not created from inside the app, they are created by some kind of interceptor which I can't find. I did find this in the cxf-context.xml config file:

<cxf:bus>
    <cxf:features> 
        <cxf:logging /> 
    </cxf:features> 
</cxf:bus> 

But the logging still appears after I already commented these lines out of the config file.

Please help. Thanks

like image 299
avillagomez Avatar asked Apr 18 '13 00:04

avillagomez


1 Answers

Since the application uses log4j, turn the 'org.apache.cxf' Logger level to ERROR. Add this line to log4j.properties:

log4j.logger.org.apache.cxf=ERROR
like image 149
DiogoSantana Avatar answered Oct 14 '22 04:10

DiogoSantana