Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is it possible to set the log4j log file location using web.xml

 
peter tong
Ranch Hand
Posts: 246
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as caption, in presence, the log file location is set in log4j.properties, log4j.appender.A2.File={path}
is it possible to change set the log file location using web.xml?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The short answer is yes.

Search for "initialization servlet" on the manual page. This doesn't show exactly what you want. But you could configure anything you want this way. You could even write out a property file at runtime based completely on information in your web.xml.

Why do you want to though? A property file is more external/easier to change than the web.xml which is part of the app.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic