Reputation: 2111
When I deploy my war file on a standalone tomcat server and start tomcat using startup.bat script, All my System.out.println show up on the tomcat console and since there is lot of information they quickly refresh and I cant read them.
I don't see those statements in any of the tomcat log files. Is there a way to have them printed in log files(when tomcat console is open as well)? Looks like all that information gets printed on tomcat and never goes to the log files.
Upvotes: 0
Views: 800
Reputation: 308988
System.out.println isn't a good idea. Your experience is correct: Those records are written to the console. That's not helpful if you don't have access to the server.
A better solution is to use log4j or its successor, slf4j.
I wonder if this could be a solution for you.
Upvotes: 1