Log rotate configuration in tomcat 8 on ubuntu 20.04 LTS


 

One of the most intriguing (and maybe one of the most significant too) registries in a Linux framework is/var/log. As per the Filesystem Hierarchy Standard, the movement of most administrations running in the framework are kept in touch with a record inside this catalog or one of its subdirectories.

Such documents are known as logs and are the way to analyzing how the framework is working (and how it has acted before). Logs are likewise the main wellspring of data where chairmen and designers look while investigating. 

 

In this post, We will configure log rotate with Apache tomcat 8 on ubuntu 20.04 LTS 

 

Insert the following to the above file:      
    /{PATH_TO_CATALINA_FILE}/*.* {
    copytruncate
    daily
    rotate 3
    compress
    missingok
    size 100M
    }

 

Create a configuration file in the following path: /etc/logrotate.d/ . For example: /etc/logrotate.d/tomcat
Log rotate configuration in tomcat 8 on ubuntu 20.04 LTS

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top