We're using websphere as our AppServer. I was searching for some ideas/patterns on logging in a distributed j2ee environment. I found none. I was especially hoping to find some patterns using log4j in this environment.
Any help you can provide will be appreciated...
My team is using the Jakarta Commons Logging API.
Commons Logging is a thin API that rides on top of other logging toolkits (Log4j, java.util.logging, etc).
One of our client runs our product on WebSphere. For logging we've chosen to use log4j and that works just fine. I guess for a distributed environment you just end up with a log file on each machine, since writing to the same file might cause unwanted problems. If you go for the new log4j I know they have support JDBC logging, which would solve that problem - albeit be a bit slow?
Jakarta LOG4J allows you to set up a network log server and using socket appenders in the distributed app all involved nodes may log to that single log server. We have a setup with 8 RMI servers logging to 2 LOG4J log servers; doing it in J2EE should be easy, too. See the LOG4J docs.