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
- Open your file
logback.xml, located in the config subdirectory of your Content Delivery root location, in a plain-text editor or XML editor. - Open the sample
logback.xmlconfiguration file for Archive Manager: on the Archive Manager installation media, navigate to the folderContent Delivery\resources\configurations\and open the file in a plain-text editor or XML editor. - 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" /> - In the
logback_sample.xmlfile, copy the following<!-- Appenders -->section into thelogback.xmlfile:<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>Note: The code assumes the properties added by the Content Deliverylogback.xmlfile are available at the top of the file. - In the
logback_sample.xmlfile, copy the following<!-- Loggers -->section into thelogback.xmlfile:<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> - Save and close
logback.xml.