How can I specify a common location for LOG4J log files running under different servers?

Discussion in 'Java' started by Kent Lichty, Nov 7, 2003.

  1. Kent Lichty

    Kent Lichty Guest

    We have a modest web application and are using Log4J for logging. Our
    standard Web Server is Tomcat, so in our log4j.properties file we have
    this entry to specify where the log file is to be created:

    log4j.appender.logfile.File=${catalina.home}\\logs\\OurLogName.log

    This works fine for Tomcat, but we also want to be able to install the
    application on WebSphere with minimal user intervention. So, the above
    line causes a problem because there is probably no catalina.home
    environment variable and even if there were it probably points to some
    non-existent directory.

    Again, we would like to be able to install the application on
    WebSphere without forcing the user to change the log4j.properties file
    to tell us where to put the log file. WebSphere does have a "logs"
    directory, but its on a different level than the Tomcat "logs"
    directory.

    I would like to know how other people have addressed this same
    problem. Thanks for your help.
     
    Kent Lichty, Nov 7, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brett Sheeran
    Replies:
    0
    Views:
    2,915
    Brett Sheeran
    Jul 15, 2003
  2. crash.test.dummy
    Replies:
    1
    Views:
    1,125
    Raymond DeCampo
    Feb 24, 2006
  3. LDF

    Log4j and Log Servers

    LDF, May 27, 2006, in forum: Java
    Replies:
    2
    Views:
    1,573
  4. unomystEz
    Replies:
    0
    Views:
    560
    unomystEz
    Nov 19, 2006
  5. John Reye
    Replies:
    28
    Views:
    1,380
    Tim Rentsch
    May 8, 2012
Loading...

Share This Page