Logging for the Repair Service 

Configure Repair Service logging information such as location, configuration, and rotation using logback.xml.

Repair Service log names and locations 

All Repair Service activity is logged by default to a log file in the repair_service directory applicable to the install type and each cluster name:
Package installs
/var/log/opscenter/repair_service/<cluster_name>.log
Tarball installs
<install_location>/log/repair_service/<cluster_name>.log

Rotating the Repair Service log 

The log file is automatically rotated at ~9.5MB (<maxFileSize> logback setting), keeping up to ten rotated logs by default (<maxIndex> logback setting).

Configuring the Repair Service log 

The Repair Service log options and levels are configurable using logback.xml.

The following example shows a standard configuration for a package install. Replace cluster_name with the name of your cluster. The log level is set at the INFO level by default. The example shows temporarily setting the level to DEBUG level for troubleshooting purposes.
<appender name="cluster_name_log" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>./var/log/opscenter/repair_service/cluster_name.log</file>
     <encoder>
          <pattern>%date{ISO8601, UTC} [%X{cluster_id:-opscenterd}] %5level: %msg \(%thread\)%n%exception{20}</pattern>
      </encoder>
      <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
           <fileNamePattern>./var/log/opscenter/repair_service/cluster_name.%i.log</fileNamePattern>
           <minIndex>1</minIndex>
           <maxIndex>10</maxIndex>
       </rollingPolicy>
       <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <maxFileSize>10MB</maxFileSize>
       </triggeringPolicy>
 </appender>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
        <level>DEBUG</level>
</filter>