Can I configure BMC Atrium Orchestrator grid logs to roll over daily?

Version 1
    Share:|

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    BMC Atrium Orchestrator Platform


    APPLIES TO:

    BMC Atrium Orchestrator Platform 7.x



    QUESTION:

    Normally the grid.log and processes.log files in BMC Atrium Orchestrator (BAO) roll over when they reach a certain size. I can configure this size by editing $BAO_HOME/tomcat/webapps/baocdp/WEB-INF/classes/log4j.xml. Can I change it so the logs roll over every day, or twice a day, etc.?


    ANSWER:

    BAO by default uses the log4j class RollingFileAppender, which only supports rolling over when a file reaches a certain size. You can instead use DailyRollingFileAppender, which lets BAO roll over logs based on the time. Here is an example log4j setting that tells the peer to rollover grid.log at midnight and noon daily:

        <appender class="org.apache.log4j.DailyRollingFileAppender" name="RollingFile">
            <param name="File" value="${catalina.home}/logs/grid.log"/>
            <param name="Append" value="true"/>
            <param name="DatePattern" value="'.'yyyy-MM-dd-a" />
            <layout class="org.apache.log4j.PatternLayout">
                <param name="ConversionPattern" value="%d{DATE} %-5p %-15c{1} : %m%n"/>
            </layout>
        </appender>


    You can find more information on the available settings at https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html. You cannot use MaxBackupIndex with DailyRollingFileAppender, though you can write a workflow in BAO to delete or backup old olgs.


    Article Number:

    000101131


    Article Type:

    FAQ/Procedural



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles