Step 1: Consolidating the daily tomcat logs

ARTIFACTORY: How to reduce the amount of tomcat logs in 7.x with logrotate

AuthorFullName__c
Nir Ovadia
articleNumber
000005360
ft:sourceType
Salesforce
FirstPublishedDate
2022-08-04T06:54:33Z
lastModifiedDate
2022-08-04
VersionNumber
4
So first, merging the daily logs. To do so, we go to the
$ARTIFACTORY_HOME/app/artifactory/tomcat/conf/logging.properties

file. Here we will add the following two lines
1catalina.org.apache.juli.FileHandler.rotatable=false
2localhost.org.apache.juli.FileHandler.rotatable=false

which will prevent the rotation, as well as stop printing the date on the log. I also recommend to remove the ending hyphen (or rename it completely) in the
FileHandler.prefix=tomcat-[localhost/catalina]-
so that the logs look a bit cleaner, rather than tomcat-catalina-.log (which looks like it’s misconfigured).

This is all we need to do on the tomcat side, but I recommend making a backup of the file. This is because most upgrades will overwrite the $ARTIFACTORY_HOME/app folder, which will also overwrite the logging.properties file we added. I recommend checking out https://tomcat.apache.org/tomcat-8.0-doc/api/org/apache/juli/FileHandler.html if you want to see more on your options here.