Difference between revisions of "Logging"
(→File-based logging) |
(→Tomcat files) |
||
Line 21: | Line 21: | ||
In Apache Tomcat, various log files are generated during the execution of a Java web application. These log files provide valuable information about the application's behavior, errors, and performance. Here's a summary of some common log files in Tomcat: | In Apache Tomcat, various log files are generated during the execution of a Java web application. These log files provide valuable information about the application's behavior, errors, and performance. Here's a summary of some common log files in Tomcat: | ||
− | + | catalina.log: | |
Purpose: General logging for the Tomcat server. | Purpose: General logging for the Tomcat server. | ||
Contents: Includes information about server startup, shutdown, and any errors that occur during the server's operation. | Contents: Includes information about server startup, shutdown, and any errors that occur during the server's operation. | ||
+ | |||
+ | catalina.<date>.log: | ||
+ | Purpose: Daily rotating log file for Catalina. | ||
+ | Contents: Includes information specific to the Catalina component of Tomcat. Useful for troubleshooting Catalina-related issues. | ||
localhost.log: | localhost.log: | ||
Purpose: Logs information related to the default "localhost" context. | Purpose: Logs information related to the default "localhost" context. | ||
Contents: Records information about the deployment and undeployment of web applications under the default context. | Contents: Records information about the deployment and undeployment of web applications under the default context. | ||
+ | |||
+ | localhost.<date>.log: | ||
+ | Purpose: Daily rotating log file for the default "localhost" context. | ||
+ | Contents: Contains information specific to the default web application context. Useful for troubleshooting application-specific issues. | ||
localhost_access_log.txt: | localhost_access_log.txt: | ||
Line 33: | Line 41: | ||
Contents: Contains details like client IP address, request date and time, HTTP status, and bytes sent. | Contents: Contains details like client IP address, request date and time, HTTP status, and bytes sent. | ||
− | + | localhost_access_log.<date>.txt: | |
− | Purpose: Daily rotating log file for | + | Purpose: Daily rotating log file for localhost_access_log |
− | Contents: | + | Contents: The daily rotation of the localhost_access_log |
manager.log: | manager.log: | ||
Line 44: | Line 52: | ||
Purpose: Logs information about the Host Manager application. | Purpose: Logs information about the Host Manager application. | ||
Contents: Records deployment and undeployment activities performed through the Host Manager. | Contents: Records deployment and undeployment activities performed through the Host Manager. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=Database Logging= | =Database Logging= |
Revision as of 05:27, 8 December 2023
The Fusion Metadata Registry logs information regarding the requests made to it and the work that it is performing. These logs can be long and complicated, but this document aims to explain the logging process.
Logging information is stored in the filesystem as well as in database tables. The files on your system are possibly more transient so unless you take action these will likely be replaced with more recent log information. This is to prevent the size of the log files consuming all of your disk space.
File-based logging
The actual logs generated are controlled by a system setting in the FMR which directly relates to the logging tool that the FMR uses, which is called Logback. The actual files generated are also affected by the Java Web-Application Server you are running (for example Apache Tomcat).
While log files often convey useful information, they naturally grow bigger over time. If allowed to grow indefinitely, their size could become a problem.
Logging libraries address this problem using rolling file appenders, which automatically “roll” or archive the current log file, and resume logging in a new file when certain predefined conditions occur, thereby preventing unwanted downtime.
Logback
Tomcat files
In Apache Tomcat, various log files are generated during the execution of a Java web application. These log files provide valuable information about the application's behavior, errors, and performance. Here's a summary of some common log files in Tomcat:
catalina.log: Purpose: General logging for the Tomcat server. Contents: Includes information about server startup, shutdown, and any errors that occur during the server's operation.
catalina.<date>.log: Purpose: Daily rotating log file for Catalina. Contents: Includes information specific to the Catalina component of Tomcat. Useful for troubleshooting Catalina-related issues.
localhost.log: Purpose: Logs information related to the default "localhost" context. Contents: Records information about the deployment and undeployment of web applications under the default context.
localhost.<date>.log: Purpose: Daily rotating log file for the default "localhost" context. Contents: Contains information specific to the default web application context. Useful for troubleshooting application-specific issues.
localhost_access_log.txt: Purpose: Records access information, such as requests made to the Tomcat server. Contents: Contains details like client IP address, request date and time, HTTP status, and bytes sent.
localhost_access_log.<date>.txt: Purpose: Daily rotating log file for localhost_access_log Contents: The daily rotation of the localhost_access_log
manager.log: Purpose: Logs information about the Tomcat Manager application. Contents: Records deployment and undeployment activities performed through the Tomcat Manager.
host-manager.log: Purpose: Logs information about the Host Manager application. Contents: Records deployment and undeployment activities performed through the Host Manager.
Database Logging
There are also log tables within the database which persist some of this information.
- Log Tables
- Audit Tables