Announcement Announcement Module
Collapse
No announcement yet.
Configure path to log file in appCtx.xml? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Configure path to log file in appCtx.xml?

    Hi,

    My webapp gets deployed to several tomcats, and log files have to go into $CATALINA_HOME/logs.

    My beans are configured via PropertyPlaceholderConfigurer, but I still have to use ant's filter tag to adjust the path to the log file in log4j.properties.

    Any idea how to get rid of the filter tag?

    TIA, Dan

  • #2
    If a configuration variable doesn't end up in a .properties file, where would you like for it to come from? Where that is, you can create a subclass of the configuerer to get it from there. Some possibilties:
    - The environment
    - a database

    Using system properties in your start up script (not advised, but an option) is already supported by the configurers.

    Comment


    • #3
      Sorry, I don't think I understand. I'll try to be clearer this time:

      I want the path to the log file be configured at runtime, and my problem is that I cannot use PropertyPlaceholderConfigurer, because the log file path must go into log4j.properties, and not applicationContext.xml.

      TIA, Dan

      Comment

      Working...
      X