logging - Loading log4j in Tomcat -


i have web-app log4j.xml has been defined specifies appender output console only. web-app being deployed in tomcat7 in windows environment. need include log4j.xml specify appenders output console file. have created log4j.xml , placed in conf folder same , have followed steps bootstrap log4j tomcat.
problem:
have tried modifying catalina.bat file update logging_config catalina_home/conf/log4j.xml did not work.i unable configure tomcat pick log4j in conf folder. picks 1 in web-app. able more info on problem including below lines in catalina.bat file.

rem details on instiation of log4j set java_opts=-dlog4j.debug 

it gave me below output

log4j: trying find [log4j.xml] using context classloader webappclassloader   context:   delegate: false   repositories:     /web-inf/classes/ ----------> parent classloader: org.apache.catalina.loader.standardclassloader@7daf6ecc . log4j: using url [file:/c:/whp-tomcat-7/webapps/root/web-inf/classes/log4j.xml] automatic log4j configuration. 

i figured has way the log4j class loader looks log4j.xml. can please me defining heirarchy able configure tomcat pick log4j.xml conf folder @ catalina home?

thanks in advance


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -