Activity logging

It may be useful to make the TinyMCE server-side components write to their own log file. This can assist in troubleshooting and make it easier to provide logs as part of a support ticket.

The TinyMCE server-side components use the Logback logging format.

To write the logs to a specific file:

  1. Create a logging configuration XML file. Save the snippet below as logback.xml after replacing {$LOG_LOCATION} with the full path to the destination log file (e.g. /var/log/tinymce_server_components.log).

      <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
          <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
      <appender name="FILE" class="ch.qos.logback.core.FileAppender">
          <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
      <!-- The name "com.ephox" refers to all TinyMCE server-side components. -->
      <logger name="com.ephox" level="INFO"/>
      <root level="INFO">
        <appender-ref ref="FILE" />
        <!-- If you want logging to go to the container as well uncomment
        the following line -->
        <!-- <appender-ref ref="STDOUT" /> -->
  2. Pass the configuration file to the Java application server. Assuming you’ve saved your logback.xml file in /etc/opt/tinymce, follow step 4 and step 5 on the Install Server-side Components page to set the following JVM system property on your Java application server: