My old Tomcat Server used to have logging in this format (/logs/catalina.log)
INFO | jvm 1 | 2014/01/05 04:42:35 | Recal Basket
A similar line in a new Server install (Apache Tomcat/5.5.25) shows up as:
So the columns with INFO, jvm 1, date and time are missing.
What kind of logging set up is required to get these columns back in? I particularly need date and time for log entries generated by "System.out.println".
Ro Vi wrote:I particularly need date and time for log entries generated by "System.out.println".
You won't get them. System.out.println writes verbatim to stdout (which is redirected to catalina.out). No extra decorations, including timestamps.
If you want the amenities of logging, you have to incorporate a logger in your web application. Which one you choose is up to you, and every web app must configure its own logging.
The timestamped log entries in catalina.out are written by JULI (java.util.logging), which has been configured to send its output to stdout (redirected to catalina.out). That applies only to the Tomcat server itself, however. As I said, each webapp has to set up its own logging system.
Complex webapps often have to incorporate a logging aggregator as well (such as slf4j), since third-party libraries often use different loggers.
Lasagna is spaghetti flvored cake. Just like this tiny ad: