简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM