I am using Tomcat 7 / 8 in cloud, in panel log viewer got below log files: Log files
And i found official document from tomcat, but still confused. https://tomcat.apache.org/tomcat-7.0-doc/logging.html
I cannot access such folder like /apache/apache-tomcat-8.0.15/logs Can explain the usage for each log file with sample words?
In simple words:
Catalina.out - Some app logs and system specific logs
instance.log - Application specific logs
access log - Contains the app paths that were accessed (the users' Web requests)
More details / bg:
Catalina.out : "When running Tomcat on unixes, the console output is usually redirected to the file named catalina.out", so your System.out.println, logger.info, or exception should be found in it.
instance.log : the log related to application running status / life cycle.
There are two main approaches to configure Tomcat logs:
a. The java.util.logging (JUL) API
found at ${catalina.base}/conf/logging.properties
b. Apache log4j
found at $CATALINA_BASE/lib/log4j.properties
. Don't confuse this with application's logs.
log4j.jar
and log4j.properties
go into WEB-INF/lib
and WEB-INF/classes
, respectively, in your web application.