Managing Log Files

This article instructs on-premise administrators on how to manage log files. For a complete description of all log files, see Log Files.

Logs location

By default, logs are written to the main Tomcat logs folder ("/logs" in the root installation directory). This location can be changed by adding (or modifying) the following property:"log.directory" property, and setting its value to the full path where you would like your logs written.

Property Values Description Requires restart?
log.directory Folder path Set the value of this property to the full path on the filesystem where you would like your logs written. Yes
 

Log rotation

Most log files rotate either by size (usually 100MB maximum size), by date (usually they are rotated daily), or both. Rotated log files are stored in /backups as a sub-folder of the main log directory (either the default, or an explicit configuration; see above). Inside the backups directory, logs are organized by type, and then by month. All rotated logs are zipped.

It is important to point out that certain logs do not rotate. You must schedule a manual rotation of these logs periodically:

  • catalina.out (stderr.log equivalent on Windows) 
  • access.log (stored in logs/access/)
Was this article helpful?
0 out of 0 found this helpful