Log Files

Magic Collaboration Studio runs under the Magic Collaboration Studio user and, by default, stores log files of Magic Collaboration Studio and Authserver under this user's profile (/home/twcloud). There are 2 configuration files that control the location of these log files:

  • <install_root>/TeamworkCloud/configuration/logback.xml - controls the location of the Magic Collaboration Studio log files.
  • <install_root>/WebAppPlatform/shared/conf/logback.xml - controls the location of the Web Application Platform services log files.


In the logback.xml file, there are settings for log files that must be edited.

<install_root>/TeamworkCloud/configuration/logback.xml
<appender name="SERVER-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${user.home}/.twcloud/2022x/server.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
                <fileNamePattern>${user.home}/.twcloud/2022x/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.SSSXXX} %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/2022x/startup-config.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
                <fileNamePattern>${user.home}/.twcloud/2022x/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>

<appender name="SECURITY-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${user.home}/.twcloud/2022x/security.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <!-- daily rollover -->
                <fileNamePattern>${user.home}/.twcloud/2022x/security.%d{yyyy-MM-dd}.log</fileNamePattern>
        </rollingPolicy>
        <encoder>
          <pattern>%-5.5level %date{YYYY-MM-dd HH:mm:ss.SSSXXX} %message [%logger{200}, %thread{10}]%n</pattern>
        </encoder>
</appender>

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


The logback-spring.xml file contains one section which must be modified.

<install_root>/WebAppPlatform/shared/conf/logback.xml
<appender name="WEB-APP-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <append>true</append>
    <file>${WEBAPP_LOG_BASE}/logs/webappplatform/web-app.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>${WEBAPP_LOG_BASE}/logs/webappplatform/web-app.%i.log.zip</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>10</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>100MB</maxFileSize>
    </triggeringPolicy>
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
      <pattern>%date [%thread] %-5level %logger - %msg%n</pattern>
    </encoder>
</appender>

<appender name="TWC_RESPONSE_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <append>true</append>
    <file>${WEBAPP_LOG_BASE}/logs/webappplatform/twc_rest.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>${WEBAPP_LOG_BASE}/logs/webappplatform/twc_rest.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>10</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>100MB</maxFileSize>
    </triggeringPolicy>
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
        <pattern>%date [%thread] %-5level %logger - %msg%n</pattern>
    </encoder>
</appender>

<appender name="ADMIN-CONSOLE-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${WEBAPP_LOG_BASE}/logs/webappplatform/admin-console.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>${WEBAPP_LOG_BASE}/logs/webappplatform/admin-console.%i.log.zip</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>10</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>100MB</maxFileSize>
    </triggeringPolicy>
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
        <pattern>%date [%thread] %-5level %logger - %msg%n</pattern>
    </encoder>
</appender>

<appender name="COLLABORATOR-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <append>true</append>
    <file>${WEBAPP_LOG_BASE}/logs/webappplatform/collaborator.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>${WEBAPP_LOG_BASE}/logs/webappplatform/collaborator.%i.log.zip</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>10</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>100MB</maxFileSize>
    </triggeringPolicy>
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
        <pattern>%date [%thread] %-5level %logger - %msg%n</pattern>
    </encoder>
</appender>

<appender name="DOCUMENT-EXPORTER-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${WEBAPP_LOG_BASE}/logs/webappplatform/document-exporter.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>${WEBAPP_LOG_BASE}/logs/webappplatform/document-exporter.%i.log.zip</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>10</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>100MB</maxFileSize>
    </triggeringPolicy>
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
        <pattern>%date [%thread] %-5level %logger - %msg%n</pattern>
    </encoder>
</appender>

<appender name="RESOURCES-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <append>true</append>
    <file>${WEBAPP_LOG_BASE}/logs/webappplatform/resources.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>${WEBAPP_LOG_BASE}/logs/webappplatform/resources.%i.log.zip</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>10</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>100MB</maxFileSize>
    </triggeringPolicy>
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
        <pattern>%date [%thread] %-5level %logger - %msg%n</pattern>
    </encoder>
</appender>

<appender name="RESOURCE-USAGE-MAP-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${WEBAPP_LOG_BASE}/logs/webappplatform/resource-usage-map.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>${WEBAPP_LOG_BASE}/logs/webappplatform/resource-usage-map.%i.log.zip</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>10</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>100MB</maxFileSize>
    </triggeringPolicy>
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
        <pattern>%date [%thread] %-5level %logger - %msg%n</pattern>
    </encoder>
</appender>

<appender name="REPORTS-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${WEBAPP_LOG_BASE}/logs/webappplatform/reports.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>${WEBAPP_LOG_BASE}/logs/webappplatform/reports.%i.log.zip</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>10</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>100MB</maxFileSize>
    </triggeringPolicy>
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
        <pattern>%date [%thread] %-5level %logger - %msg%n</pattern>
    </encoder>
</appender>

<appender name="SIMULATION-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <append>true</append>
    <file>${WEBAPP_LOG_BASE}/logs/webappplatform/simulation.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>${WEBAPP_LOG_BASE}/logs/webappplatform/simulation.%i.log.zip</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>10</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>100MB</maxFileSize>
    </triggeringPolicy>
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
        <pattern>%date [%thread] %-5level %logger - %msg%n</pattern>
    </encoder>
</appender>

<appender name="AUTHENTICATION-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${WEBAPP_LOG_BASE}/logs/webappplatform/authentication.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>${WEBAPP_LOG_BASE}/logs/webappplatform/authentication.%i.log.zip</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>10</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>100MB</maxFileSize>
    </triggeringPolicy>
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
        <pattern>%date [%thread] %-5level %logger - %msg%n</pattern>
    </encoder>
</appender>

The same changes and permissions apply to the changes in this file as to those in <install_root>/TeamworkCloud/configuration/logback.xml.


Files installed on system locations

Daemon control filesEnvironment filesCassandra installation
  • /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 to /logs/commitlog