• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Log4j - newbie question

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day !!
I'm new to webapp programming and log4j, so forgive me if this sounds a little silly. Unfortunately, I could any documentation on my question.
I would like to use Log4J in some custom tags that have been created for our webapps. Where would I put the configuration files for the custom tag ? Where would I create the initializing servlet ?
As well, I would like to create just the one config for all my webapps. Most of the documentation I've read suggests to put the config file in each webapp's WEB-INF/classes folder. Is there a way where I could use just the one config file ?
Thanks !
Sylvia

PS: We are using Tomcat and Apache on a Sun box.
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be able to use a common configuration file by including something like "-Dlog4j.configuration=file://some-path/our-config.xml" in the CATALINA_OPTS (or TOMCAT_OPTS) environment variable.
But how are you going to prevent all your web applications from interfering with each other when they are logging?
Have you read the Log4j Documentation?.
Your issue is discussed somewhere about two-thirds down.
[ February 04, 2004: Message edited by: Barry Gaunt ]
 
Sylvia H Charbonneau
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would this also work for the custum tag config files ? If we choose to change where the webapps have their config files, would this parameter override the files located in the webapps WEB-INF/classes ?
Sylvia
 
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!