different log4J log files for same application

Discussion in 'Java' started by crash.test.dummy, Feb 23, 2006.

  1. hi,
    i have an application that listens on a specific port to do its task.
    This application can run on multiple instances by specifying different
    ports in the argument.

    MyApp-1211.bat contains
    java MyApp 1211

    MyApp-1311.bat contains
    java MyApp 1311

    MyApp-1411.bat contains
    java MyApp 1411


    this application logs to a file. the problem is all 3 instances log
    into a single file, myApp.log. is there a way to tell log4j to use
    different log files, like:

    myApp-port1211.log
    myApp-port1311.log
    myApp-port1411.log

    thanks.
     
    crash.test.dummy, Feb 23, 2006
    #1
    1. Advertising

  2. crash.test.dummy wrote:
    > hi,
    > i have an application that listens on a specific port to do its task.
    > This application can run on multiple instances by specifying different
    > ports in the argument.
    >
    > MyApp-1211.bat contains
    > java MyApp 1211
    >
    > MyApp-1311.bat contains
    > java MyApp 1311
    >
    > MyApp-1411.bat contains
    > java MyApp 1411
    >
    >
    > this application logs to a file. the problem is all 3 instances log
    > into a single file, myApp.log. is there a way to tell log4j to use
    > different log files, like:
    >
    > myApp-port1211.log
    > myApp-port1311.log
    > myApp-port1411.log


    The short answer is yes. The long answer is that I can't tell you
    exactly how to do it, but perhaps the folks at the log4j-users mailing
    list () can. See http://www.apache.org/
    for subscription info.

    HTH,
    Ray

    --
    This signature intentionally left blank.
     
    Raymond DeCampo, Feb 24, 2006
    #2
    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. Kent Lichty
    Replies:
    0
    Views:
    5,687
    Kent Lichty
    Nov 7, 2003
  2. Alex Hunsley
    Replies:
    2
    Views:
    13,075
    =?ISO-8859-15?Q?Fr=E9d=E9ric_G=E9din?=
    May 28, 2004
  3. Tobias Merler
    Replies:
    0
    Views:
    842
    Tobias Merler
    Oct 7, 2004
  4. unomystEz
    Replies:
    0
    Views:
    584
    unomystEz
    Nov 19, 2006
  5. vj
    Replies:
    0
    Views:
    706
Loading...

Share This Page