Results 1 to 3 of 3

Thread: Configure path to log file in appCtx.xml?

  1. #1
    Join Date
    Sep 2004
    Posts
    127

    Default 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. #2
    Join Date
    Feb 2005
    Location
    Boston, MA
    Posts
    1,142

    Default

    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. #3
    Join Date
    Sep 2004
    Posts
    127

    Default

    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

Similar Threads

  1. Replies: 5
    Last Post: Mar 17th, 2010, 04:32 AM
  2. Saving large files to a db using hibernate?
    By Dan Washusen in forum Data
    Replies: 10
    Last Post: Sep 20th, 2006, 12:18 PM
  3. Replies: 0
    Last Post: Sep 5th, 2005, 08:49 AM
  4. Replies: 4
    Last Post: Aug 26th, 2005, 03:03 AM
  5. Replies: 1
    Last Post: May 27th, 2005, 09:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •