Documentation Center

Configuring Archive Manager logging

Content Delivery uses the logback logging framework. The following procedure describes how to configure your existing logback.xml file for Archive Manager.

Procedure

  1. Open your file logback.xml, located in the config subdirectory of your Content Delivery root location, in a plain-text editor or XML editor.
  2. Open the sample logback.xml configuration file for Archive Manager: on the Archive Manager installation media, navigate to the folder Content Delivery\resources\configurations\ and open the file in a plain-text editor or XML editor.
  3. At the top of the file, where the properties are listed, add the following line:
    <property name="log.pattern.transaction" value="%date %-5level %logger {0} - [T:%X{transactionId}] %message%\n" />
    <property name="log.history.audit" value="30" />
  4. In the logback_sample.xml file, copy the following <!-- Appenders --> section into the logback.xml file:
    <appender name="rollingAMLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
      <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <fileNamePattern>${log.folder}/cd_archivemanager.%d{yyyy-MM-dd}.log</fileNamePattern>
        <maxHistory>${log.history}</maxHistory>
      </rollingPolicy>
      <encoder>
        <pattern>${log.pattern}</pattern>
      </encoder>
      <prudent>true</prudent>
    </appender>
    
    <appender name="rollingAMLogTransaction" class="ch.qos.logback.core.rolling.RollingFileAppender">
      <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <fileNamePattern>${log.folder}/cd_archivemanager.%d{yyyy-MM-dd}.log</fileNamePattern>
        <maxHistory>${log.history}</maxHistory>
      </rollingPolicy>
      <encoder>
        <pattern>${log.pattern.transaction}</pattern>
      </encoder>
      <prudent>true</prudent>
    </appender>
    
    <appender name="rollingAuditLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
      <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <fileNamePattern>${log.folder}/cd_archivemanager_audit.%d{yyyy-MM-dd}.log</fileNamePattern>
        <maxHistory>${log.history.audit}</maxHistory>
      </rollingPolicy>
      <encoder>
        <pattern>${log.pattern}</pattern>
      </encoder>
    </appender>
  5. In the logback_sample.xml file, copy the following <!-- Loggers --> section into the logback.xml file:
    <logger name="com.tridion.archiving">
      <appender-ref ref="rollingAMLog"/>
    </logger>      
    <logger name="com.tridion.archiving.manager.PipelineRunner-Audit" level="info">
      <appender-ref ref="rollingAuditLog"/>
    </logger>
    <logger name="com.tridion.archiving.manager.ArchiveManagerHost-Audit" level="info">
      <appender-ref ref="rollingAuditLog"/>
    </logger>
    <logger name="com.tridion.archiving.retrieval.ResponsePackageBuilder-Audit" level="info">
      <appender-ref ref="rollingAuditLog"/>
    </logger>
    <logger name="com.tridion.storage.archivemanager">
      <appender-ref ref="rollingAMLogTransaction"/> 
    </logger>
    <logger name="com.tridion.storage.archivemanager.service.StorageAdaptor-Audit" level="info">
      <appender-ref ref="rollingAuditLog"/>
    </logger>
  6. Save and close logback.xml.