It may be useful to make the Textbox.io 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.

To write the logs to a specific file, you’ll need to perform the following steps:

Step 1. Create a logging configuration XML file

The Textbox.io services use the Logback logging format.

Save the snippet below as logback.xml after replacing {$LOG_LOCATION} with the full path to the destination log file (e.g. /var/log/textboxio_server_components.log).

<configuration>

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>

  <appender name="FILE" class="ch.qos.logback.core.FileAppender">
    <file>{$LOG_LOCATION}</file>
    <encoder>
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>

  <!-- The name "com.ephox" refers to all the Textbox.io 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" /> -->
  </root>

</configuration> 

Step 2. Pass the configuration file to the Java application server

Assuming you've saved your logback.xml file in /etc/opt/textbox, follow step 4 and step 5 on the Installation and Setup page to set the following JVM system property on your Java application server:

Logging configuration file JVM property
-Dlogback.configurationFile=/etc/opt/textbox/logback.xml