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

  • Configure path to log file in appCtx.xml?


    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

    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.


    • #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, and not applicationContext.xml.

      TIA, Dan