How to log independently of other webapps using log4j? Also, reading from log file from within serv

Discussion in 'Java' started by unomystEz, Nov 19, 2006.

  1. unomystEz

    unomystEz Guest

    Hi all,

    I have 3 webapps that i package and deploy as a war file. I plan on
    supporting tomcat, resin, jetty and orion. I believe resin uses
    jdk-logging, tomcat uses commons-logging. afaik, with tomcat, I can
    put log4j.jar in common/lib and log4j.properties in common/classes and
    it will output my applications logging (which is log4j) to that the
    tomcat/logs directory. Since I may have multiple deployments of the
    same app, I don't want the logs to be interlaced. Is it possible to
    setup log4j in a way so that each webapp has it's own log4j.properties
    file and logs independently of each other?

    Also, I would also be interested in knowing if it's possible to read
    the log file from within the servlet as I would like to see whats going
    on from a webbrowser (in case an error was thrown, etc..). Maybe I
    should post this as another subject.

    thanks,
    unomystEz, Nov 19, 2006
    #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. Rodolfo
    Replies:
    0
    Views:
    946
    Rodolfo
    Jul 12, 2004
  2. PeterH
    Replies:
    2
    Views:
    2,049
    Juha Laiho
    Oct 9, 2005
  3. Joerg Schuster
    Replies:
    5
    Views:
    308
    Kay Schluehr
    May 25, 2005
  4. vj
    Replies:
    0
    Views:
    671
  5. Replies:
    1
    Views:
    431
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Jun 3, 2007
Loading...

Share This Page