This content has been marked as final. Show 4 replies
Do you mean each thread use System.out.println?
You would have to run each server as a separate application, not as threads in the same application.
Possibly you can achieve your goals by changing where the output from each server thread is sent. See
Reassigns the "standard" output stream.
Reassigns the "standard" error output stream.
Why not log the output to separate files?
You cannnot start a thread in one console and start another thread in another console.
The best way of differentiating the 2 server outputs are to make the output statements more intelligently something as this:
System.out.println("DiscoverServer =>" + DiscoverServer.serviceName() + " service started."); System.out.println("BackUpServer =>" + BackUpServer.serviceName() + " service started.");