apache commons httpclient - How to disable Kayako REST API DEBUG logs -


i using kayako rest api ticketing service. calling api apache.commons.httpclient.methods.postmethod. in every call kayako rest api write numerous logs in console like:

14:40:33.716 [http-bio-8080-exec-35] debug o.a.c.h.params.defaulthttpparams - set parameter http.useragent = jakarta commons-httpclient/3.1 14:40:33.722 [http-bio-8080-exec-35] debug o.a.c.h.params.defaulthttpparams - set parameter http.protocol.version = http/1.1 14:40:33.723 [http-bio-8080-exec-35] debug o.a.c.h.params.defaulthttpparams - set parameter http.connection-manager.class = class org.apache.commons.httpclient.simplehttpconnectionmanager 14:40:33.723 [http-bio-8080-exec-35] debug o.a.c.h.params.defaulthttpparams - set parameter http.protocol.cookie-policy = default 14:40:33.723 [http-bio-8080-exec-35] debug o.a.c.h.params.defaulthttpparams - set parameter http.protocol.element-charset = us-ascii 14:40:33.723 [http-bio-8080-exec-35] debug o.a.c.h.params.defaulthttpparams - set parameter http.protocol.content-charset = iso-8859-1 14:40:33.724 [http-bio-8080-exec-35] debug o.a.c.h.params.defaulthttpparams - set parameter http.method.retry-handler = org.apache.commons.httpclient.defaulthttpmethodretryhandler@74288b49 14:40:33.724 [http-bio-8080-exec-35] debug o.a.c.h.params.defaulthttpparams - set parameter http.dateparser.patterns = [eee, dd mmm yyyy hh:mm:ss zzz, eeee, dd-mmm-yy hh:mm:ss zzz, eee mmm d hh:mm:ss yyyy, eee, dd-mmm-yyyy hh:mm:ss z, eee, dd-mmm-yyyy hh-mm-ss z, eee, dd mmm yy hh:mm:ss z, eee dd-mmm-yyyy hh:mm:ss z, eee dd mmm yyyy hh:mm:ss z, eee dd-mmm-yyyy hh-mm-ss z, eee dd-mmm-yy hh:mm:ss z, eee dd mmm yy hh:mm:ss z, eee,dd-mmm-yy hh:mm:ss z, eee,dd-mmm-yyyy hh:mm:ss z, eee, dd-mm-yyyy hh:mm:ss z] 14:40:33.736 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - java version: 1.7.0_11 14:40:33.736 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - java vendor: oracle corporation 14:40:33.736 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - java class path: d:\liferay-portal-6.1.1-ce-ga2\tomcat-7.0.27\bin\bootstrap.jar;d:\liferay-portal-6.1.1-ce-ga2\tomcat-7.0.27\bin\tomcat-juli.jar 14:40:33.736 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - operating system name: windows 7 14:40:33.736 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - operating system architecture: amd64 14:40:33.736 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - operating system version: 6.1 14:40:33.736 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - sun 1.7: sun (dsa key/parameter generation; dsa signing; sha-1, md5 digests; securerandom; x.509 certificates; jks keystore; pkix certpathvalidator; pkix certpathbuilder; ldap, collection certstores, javapolicy policy; javaloginconfig configuration) 14:40:33.736 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - sunrsasign 1.7: sun rsa signature provider 14:40:33.737 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - sunec 1.7: sun elliptic curve provider (ec, ecdsa, ecdh) 14:40:33.737 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - sunjsse 1.7: sun jsse provider(pkcs12, sunx509 key/trust factories, sslv3, tlsv1) 14:40:33.737 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - sunjce 1.7: sunjce provider (implements rsa, des, triple des, aes, blowfish, arcfour, rc2, pbe, diffie-hellman, hmac) 14:40:33.737 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - sunjgss 1.7: sun (kerberos v5, spnego) 14:40:33.737 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - sunsasl 1.7: sun sasl provider(implements client mechanisms for: digest-md5, gssapi, external, plain, cram-md5, ntlm; server mechanisms for: digest-md5, gssapi, cram-md5, ntlm) 14:40:33.737 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - xmldsig 1.0: xmldsig (dom xmlsignaturefactory; dom keyinfofactory) 14:40:33.737 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - sunpcsc 1.7: sun pc/sc provider 14:40:33.737 [http-bio-8080-exec-35] debug o.a.commons.httpclient.httpclient - sunmscapi 1.7: sun's microsoft crypto api provider 

i have added configuration in log4j.properties :

log4j.logger.httpclient.wire.header=warn log4j.logger.httpclient.wire.content=warn​ 

but properties doesn't disable kayako logging in console. can me disable kayako debug logs?

i trying fix spring framework found link: http://www.codingpedia.org/ama/how-to-log-in-spring-with-slf4j-and-logback/

in case created logback.xml file in src/main/resources.

my code: http://pastebin.com/s48yy7jw

you need change line <logger name="org.springframework" additivity="false"> root package of kayako. change <level value="info" /> wanted level.

hope helps.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -