Log Files

Teamwork Cloud executes under the Teamwork Cloud user, and by default will store log files of Teamwork Cloud and Authserver under this user's profile (/home/twcloud). There are 2 configuration files that control the location of these log files:

/opt/local/TeamworkCloud/configuration/logback.xml

In this file, there are settings for 2 log files that must be edited.

<appender name="SERVER-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${user.home}/.twcloud/2021x/server.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
                <fileNamePattern>${user.home}/.twcloud/2021x/server.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>     
                <maxFileSize>50MB</maxFileSize> 
                <totalSizeCap>1024MB</totalSizeCap>
        </rollingPolicy>
        <encoder>
                  <pattern>%-5.5level %date{YYYY-MM-dd HH:mm:ss.SSS} %message [%logger{200}, %thread{10}]%n</pattern>
        </encoder>
</appender>
<appender name="SERVER-STARTUP-CONFIG-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${user.home}/.twcloud/2021x/startup-config.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
                <fileNamePattern>${user.home}/.twcloud/2021x/startup-config.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>                      
                <maxFileSize>50MB</maxFileSize> 
                <totalSizeCap>1024MB</totalSizeCap> 
        </rollingPolicy>
        <encoder>
                <pattern>%-5.5level %date{YYYY-MM-dd HH:mm:ss.SSSXXX} %message %n</pattern>
        </encoder>
</appender>

In each section, there are 2 settings that must be modified:  file and fileNamePattern. The first setting (file) controls the absolute path to the latest log file. The second setting (fileNamePattern) controls the naming convention for the archiving of the log files. In most cases, it will suffice to replace the ${user.home} token with a different location, but you must ensure that the Teamwork Cloud user has ownership of the target directories.

/opt/local/TeamworkCloud/Authserver/config/logback-spring.xml

This file contains one section which must be modified.

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
                <file>${user.home.dir}/.authserver/2021x/authserver.log</file>
                <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
                        <fileNamePattern>${user.home.dir}/.authserver/2021x/authserver.%i.log.zip</fileNamePattern>
                        <minIndex>1</minIndex>
                        <maxIndex>10</maxIndex>
                </rollingPolicy>
 
                <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
                        <maxFileSize>30MB</maxFileSize>
                </triggeringPolicy>
                <encoder>
                  <pattern>%-5.5level %date{YYYY-MM-dd HH:mm:ss.SSS} %message [%logger{0}, %thread{10}]%n</pattern>
                </encoder>
        </appender>

The same changes and permissions apply to the changes to this file as to those for /opt/local/TeamworkCloud/configuration/logback.xml.

Files installed on system locations

Daemon control filesEnvironment filesCassandra installation
  • /etc/systemd/system/authserver.service
  • /etc/systemd/system/cassandra.service
  • /etc/systemd/system/twcloud.service
  • /etc/systemd/system/zookeeper.service
  • /etc/systemd/system/webapp.service
  • /etc/cassandra/*
  • /etc/twcloud/*
The script will place the data files in /data/data and commit logs in /logs/commitlog