different log4J log files for same application

C

crash.test.dummy

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.
 
R

Raymond DeCampo

crash.test.dummy said:
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 ([email protected]) can. See http://www.apache.org/
for subscription info.

HTH,
Ray
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top