spring mvc - Reduce logs generated by SpringMVC application -


i have springmvc 3 application uses spring security, aop, hibernate etc.

but when run in tomcat or jetty, generates huge amount of log.

how can reduce log?

i want log level starting warning.

example of log:

21:16:08.393 [qtp12506312-25] debug o.s.s.w.s.httpsessioneventpublisher - publishing event: org.springframework.security.web.session.httpsessi oncreatedevent[source=org.eclipse.jetty.server.session.hashedsess ion:db7nzoxke45es1k02gbug79d@6784961] 21:16:08.394 [qtp12506312-25] debug o.s.s.w.s.httpsessionrequestcache - defaultsavedrequest added session: defaultsavedrequest[http://xx.xx.xx.xx:8080/favicon.ico] 21:16:08.394 [qtp12506312-25] debug o.s.s.w.a.exceptiontranslationfilter - calling authentication entry point. 21:16:08.440 [qtp12506312-25] debug o.s.s.web.defaultredirectstrategy - redirecting 'http://xx.xx.xx.xx:8080/default;jsessionid=db7nzoxke45es1k02gbug79d' 21:16:08.441 [qtp12506312-25] debug o.s.s.w.c.httpsessionsecuritycontextrepository - securitycontext empty or contents anonymous - context not stored in httpsession. 21:16:08.441 [qtp12506312-25] debug o.s.s.w.c.securitycontextpersistencefilter - securitycontextholder cleared, request processing completed 21:16:08.518 [qtp12506312-26] debug o.s.s.web.util.antpathrequestmatcher - checking match of request : '/default'; against '/loginform.jsp' 21:16:08.518 [qtp12506312-26] debug o.s.s.web.util.antpathrequestmatcher - checking match of request : '/default'; against '/loginform2.jsp' 21:16:08.518 [qtp12506312-26] debug o.s.s.web.util.antpathrequestmatcher - checking match of request : '/default'; against '/default' 21:16:08.518 [qtp12506312-26] debug o.s.security.web.filterchainproxy - /default has empty filter list 

if using logback logging change root logger's log lever warning, can find logback.xml file in classpath

ex:

<root level="warn">     <appender-ref ref="stdout" />     <appender-ref ref="file" /> </root> 

if using log4j, can find log4j.properties file in classpath. change rootlogger level warning again

log4j.rootlogger=warning , a1 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -