Question

I made a web app with a ServletContextListener that in its contextInitialized() just calls two methods from two jars. The jars use log4j to print logs in its execution, what is useful for me on testing. Now, I package this app in an ear file, and deploy into a WAS, that is located into a server to which I don't have access (meaning, I can't access FTP to see paths on the server, etc) to set the path for the logs in the server, and it will take some time to get actual permission to set this.

I thought that maybe I could set log4j to print the logs in my working machine (that is also connected to the network the server is connected)

Is there anyway to do this?

No correct solution

OTHER TIPS

Log4j has many appenders: http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Appender.html

For Log to different machine you can use SocketAppender. But for yours situation better store logs in database with JDBCAppender

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top