Simple tips about Alfresco logs

Basic maintenaince of your Alfresco logs

Today I put together some basic tips about Alfresco logs in Alfresco installations.

1. Rotate catalina.out

The Tomcat Server log file catalina.out grows and grows by default. You can use a custom for default Tomcat configuration, but you can easier use logrotate for catalina.out 

$ sudo vim /etc/logrotate.d/alfresco

/opt/alfresco/tomcat/logs/catalina.out {
  rotate 10
  size 50M

If logrotate is not used by the operating system you can define a cronjob with crontab -e for your Alfresco user (owner of java process) with:

#IMPORTANT: As Alfresco user
$ crontab -e 

0 5 * * 1 /usr/sbin/logrotate /etc/logrotate.d/alfresco


2. Logs always under $TOMCAT/logs directory

It is very usual to see Alfresco logs in different folders, between $ALF_HOME, and $ALF_HOME/tomcat/logs when installing with the Alfresco bundle. You can change your for alfresco.war, share.war, or solr4.war applications (and manager and host-manager too) but the next tip is easier for keeping together in the same place. This is valid for recent Alfresco 4 and 5:

 1. Change $ALF_DATA/ script adding the next line under INSTALLDIR variable:

cd $INSTALLDIR/tomcat/logs

 2. Comment in $ALF_DATA/tomcat/scripts/ the "cd" lines:


#cd $previousdir


3. Clean logs periodically

You can use a simple crontab script for deleting old rotated logs.

# Crontab for your Alfresco user (owner of java process)
# 0 5 * * 1 /opt/alfresco/bin/



find ${LOGS_TOM}/* -mtime +${LOGS_DAYS} -name \*.log\* -delete 2>/dev/null

4. Disable Tomcat localhost logs (localhost_access_log*)

Sometimes it is desired to disable localhost_access_log* logs. For this, you should comment the valve part in server.xml config

$ vim $ALF_HOME/tomcat/conf/server.xml

        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

(and restart Alfresco Service)

5. Disable manager and host-manager logs

It is usual to disable manager and host-manager under webapps in production environment. For their preconfigured log files edit $ALF_HOME/tomcat/conf/ using only:

handlers =

and comment all related lines regarding:


External links and helping sources:


Más entradas de blog


Añadir comentarios

Angel borroy Hace 3 años

Alternative for point 2 in Alfresco 6 (Docker Compose) available at

Ainsof So'o Hace 3 años

I am using Alfresco Community 5.2 and in step 5 my handlers are listed as:


handlers =,,,, java.util.logging.ConsoleHandler


instead of


handlers =


as suggested I put


handlers =




Is this correct?

Cesar Capillas Hace 3 años



The handler used in an Alfresco 5 clean install is with Tomcat 7. I think the handler that you mentioned is used in Tomcat 8. If this is the case, you are correct. The important part is to exclude annoying logs for manager, and host manager apps. 


Kind regards.