On this page:

12.4Troubleshooting Logs

 

There are several specialized log files that can be enabled in order to troubleshoot specific issues within a Smile CDR installation.

Note that these logs can cause internal bottlenecks and decrease overall performance. They are intended to be enabled only while troubleshooting issues, and should be disabled otherwise.

12.4.1HTTP Troubleshooting Log

 

The HTTP Troubleshooting Log contains details about any received HTTP requests including request details, HTTP client details, processing time, etc.

The HTTP Troubleshooting Log is an alternative to using HTTP Access Logs that have been defined on individual modules. Note that HTTP Access Logs are more powerful since they can be defined with much more customizable formats and details, but the HTTP Troubleshooting Log can be enabled and disabled on a running server without needing to perform a restart, so each log has advantages.

The following snippet can be placed in your classes/logback.xml file in order to enable the creation of a special log file called log/http-troubleshooting.log. This file will contain details about the HTTP server processing pipeline.

<appender name="HTTP_TROUBLESHOOTING" class="ch.qos.logback.core.rolling.RollingFileAppender">
   <filter class="ch.qos.logback.classic.filter.ThresholdFilter"><level>DEBUG</level></filter>
   <file>${smile.basedir}/log/http-troubleshooting.log</file>
   <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
      <fileNamePattern>${smile.basedir}/log/http-troubleshooting.log.%i.gz</fileNamePattern>
      <minIndex>1</minIndex>
      <maxIndex>9</maxIndex>
   </rollingPolicy>
   <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
      <maxFileSize>5MB</maxFileSize>
   </triggeringPolicy>
   <encoder>
      <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %msg%n${log.stackfilter.pattern}</pattern>
   </encoder>
</appender>
<!-- Set the level below to TRACE to enable HTTP trace mode -->
<logger name="ca.cdr.log.http_troubleshooting" level="DEBUG">
   <appender-ref ref="HTTP_TROUBLESHOOTING"/>
</logger>

Including Extra Detail

If you are trying to troubleshoot networking issues, you can also enable the HTTP Troubleshooting Log in Trace Mode. This will log additional details about request headers, stream reading, etc. To enable trace mode, change the level from DEBUG to TRACE in both the filter level and the logger level above.

Logging to the Console (for Docker)

If you are using docker, it may be preferable to have this log output to the console so that it will be visible in the Docker container logs. In this case, in your classes/logback.xml file:

  • Ensure that the STDOUT_SYNC appender is set to a level of DEBUG

  • Add the following snippet:

<logger name="ca.cdr.log.security_troubleshooting" level="DEBUG">
    <appender-ref ref="STDOUT_SYNC"/>
</logger>

12.4.2Security Troubleshooting Log

 

The following snippet can be placed in your classes/logback.xml file in order to enable the creation of a special log file called log/security-troubleshooting.log. This file will contain troubleshooting details for the security layer. This can be handy when trying to determine why a particular operation is or is not being permitted.

<appender name="SECURITY_TROUBLESHOOTING" class="ch.qos.logback.core.rolling.RollingFileAppender">
   <filter class="ch.qos.logback.classic.filter.ThresholdFilter"><level>DEBUG</level></filter>
   <file>${smile.basedir}/log/security-troubleshooting.log</file>
   <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
      <fileNamePattern>${smile.basedir}/log/security-troubleshooting.log.%i.gz</fileNamePattern>
      <minIndex>1</minIndex>
      <maxIndex>9</maxIndex>
   </rollingPolicy>
   <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
      <maxFileSize>5MB</maxFileSize>
   </triggeringPolicy>
   <encoder>
      <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n${log.stackfilter.pattern}</pattern>
   </encoder>
</appender>
<logger name="ca.cdr.log.security_troubleshooting" level="DEBUG">
   <appender-ref ref="SECURITY_TROUBLESHOOTING"/>
</logger>

Logging to the Console (for Docker)

If you are using docker, it may be preferable to have this log output to the console so that it will be visible in the Docker container logs. In this case, in your classes/logback.xml file:

  • Ensure that the STDOUT_SYNC appender is set to a level of DEBUG

  • Add the following snippet:

<logger name="ca.cdr.log.security_troubleshooting" level="DEBUG">
    <appender-ref ref="STDOUT_SYNC"/>
</logger>

12.4.3Subscription Troubleshooting Log

 

The Subscription Troubleshooting log contains details about the subscription processing and any resources that pass through it. It shows the various steps along the pipeline including queueing/dequeuing, deliveries, and failures.

The following snippet can be placed in your classes/logback.xml file in order to enable the creation of a special log file called log/subscription-troubleshooting.log. This file will contain details about the subscription processing pipeline.

<appender name="SUBSCRIPTION_TROUBLESHOOTING" class="ch.qos.logback.core.rolling.RollingFileAppender">
   <filter class="ch.qos.logback.classic.filter.ThresholdFilter"><level>DEBUG</level></filter>
   <file>${smile.basedir}/log/subscription-troubleshooting.log</file>
   <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
      <fileNamePattern>${smile.basedir}/log/subscription-troubleshooting.log.%i.gz</fileNamePattern>
      <minIndex>1</minIndex>
      <maxIndex>9</maxIndex>
   </rollingPolicy>
   <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
      <maxFileSize>5MB</maxFileSize>
   </triggeringPolicy>
   <encoder>
      <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n${log.stackfilter.pattern}</pattern>
   </encoder>
</appender>
<logger name="ca.cdr.log.subscription_troubleshooting" level="DEBUG">
   <appender-ref ref="SUBSCRIPTION_TROUBLESHOOTING"/>
</logger>

Logging to the Console (for Docker)

If you are using docker, it may be preferable to have this log output to the console so that it will be visible in the Docker container logs. In this case, in your classes/logback.xml file:

  • Ensure that the STDOUT_SYNC appender is set to a level of DEBUG

  • Add the following snippet:

<logger name="ca.cdr.log.subscription_troubleshooting" level="DEBUG">
    <appender-ref ref="STDOUT_SYNC"/>
</logger>

12.4.4LiveBundle Troubleshooting Log

 

The following snippet can be placed in your classes/logback.xml file in order to enable the creation of a special log file called log/livebundle-troubleshooting.log. This log file records the number of LiveBundle records saved and purged when Subscribers are added to or deleted from Watchlists. Aggregation events have a DEBUG level, and even more detail is available at the TRACE loglevel.

	<appender name="LIVEBUNDLE_TROUBLESHOOTING" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<filter class="ch.qos.logback.classic.filter.ThresholdFilter"><level>DEBUG</level></filter>
		<file>${smile.basedir}/log/livebundle-troubleshooting.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
			<fileNamePattern>${smile.basedir}/log/livebundle-troubleshooting.log.%i.gz</fileNamePattern>
			<minIndex>1</minIndex>
			<maxIndex>9</maxIndex>
		</rollingPolicy>
		<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
			<maxFileSize>5MB</maxFileSize>
		</triggeringPolicy>
		<encoder>
			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n${log.stackfilter.pattern}</pattern>
		</encoder>
	</appender>
	<logger name="ca.cdr.log.livebundle_troubleshooting" level="DEBUG">
		<appender-ref ref="LIVEBUNDLE_TROUBLESHOOTING"/>
	</logger>

Logging to the Console (for Docker)

If you are using docker, it may be preferable to have this log output to the console so that it will be visible in the Docker container logs. In this case, in your classes/logback.xml file:

  • Ensure that the STDOUT_SYNC appender is set to a level of DEBUG

  • Add the following snippet:

<logger name="ca.cdr.log.livebundle_troubleshooting" level="DEBUG">
    <appender-ref ref="STDOUT_SYNC"/>
</logger>