I am using a third party library (cannot modify it) that uses for logging system.out.println statements. The output shows fine in the console but I am not able to retrieve those information in the catalina[...].log file?
Is it possible to send those to log4j?
The main Apache Tomcat configuration file is at installdir/apache-tomcat/conf/server. xml. Once Apache Tomcat starts, it will create several log files in the installdir/apache-tomcat/logs directory. The main log file is the catalina.
The main Apache Tomcat configuration file is at /opt/bitnami/tomcat/conf/server. xml. Once Apache Tomcat starts, it will create several log files in the /opt/bitnami/tomcat/logs directory. The main log file is the catalina.
The catalina.out log messages and log files communicate events and conditions that affect Tomcat server's operations. Logs for all identity applications components including OSP and Identity Reporting are also logged to the catalina.out file.
Each server instance contains its own Catalina.This file is located in the logs directory below the Tomcat root directory. This log is the system's output log, which also consists of standard error messages. These files are saved daily (MM-DD-YYYY) with the date appended to the name of the data.
When running Tomcat on unixes, the console output is usually redirected to the file named catalina.out. The name is configurable using an environment variable. (See the startup scripts).
http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Console
System.out.println()
prints out to stdout. Therefore, if you want to see these statements in a log file, you can just redirect stdout where you want it in the Tomcat startup script.
You can find those logs also in cat /var/log/messages
if you try
cat /var/log/messages | grep server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With