Automic Workload Automation

  • 1.  AWI logging

    Posted Oct 05, 2017 08:08 AM
    The AWI writes two logs using Logback. The locations, names, and other details of each log file are specified in in these two configuration files:
    • logback.xml
    • framework-logging.xml
    What is the difference between the two logs? What is written to each file?


  • 2.  AWI logging

    Posted Oct 05, 2017 08:18 AM
    I also noticed the system property com.uc4.ecc.log.dir mentioned in the framework log. What logs are written to the location specified by this system property? (I see only an empty access_log file.)


  • 3.  AWI logging

    Posted Nov 06, 2017 09:00 AM
    Michael Lowry wrote:
    I also noticed the system property com.uc4.ecc.log.dir mentioned in the framework log. What logs are written to the location specified by this system property? (I see only an empty access_log file.)
    For what it’s worth, I tried setting this system property before starting the AWI, but no matter what I set it to, the value ends up set to the tomcat/logs directory.


  • 4.  AWI logging

    Posted Nov 06, 2017 11:05 AM
    While investigating this topic a bit more deeply in the course of troubleshooting a problem activating AWI-AE tracing, I took a look the system properties printed to the “FRAMEWORK” log. This revealed several AWI configuration settings that had been previously unknown to me. One of them allows setting the name of the Logback configuration file. I enabled this option by adding the following to the end of the felix.properties file:
    # Properties for Automic Web Interface (AWI)
    com.uc4.ecc.development.logback.config=logback_debug.xml
    At next launch, the log showed that the property was set:
    2017-11-06 16:16:55,780 132  [localhost-startStop-1] DEBUG      ECC BOOT - com.uc4.ecc.development.logback.config: logback_debug.xml
    I can also confirm that the alternate config file was used. This will be useful when debugging AWI problems, because it will make it easy two switch between two different logging configurations:
    • A Logback config file that has verbose logging disabled, for normal day-to-day operations;
    • A Logback config file that has verbose logging turned on, for debugging & troubleshooting.


  • 5.  AWI logging

    Posted Nov 07, 2017 09:40 AM

    I learned today that the AWI does not automatically rotate logs and start a new generation of log files at start-up in the same way that the AE does.

    The Automation Engine (and most other AWA programs) automatically rotate log files at start-up. The AWI does not do this. Instead, it continues appending to existing log files until they reach the threshold size, even after being stopped and restarted many times. Only once the threshold is reached does the AWI start a new generation of logs.

    I would like to find a way to make the AWI start a new log automatically at launch.

    The exact behavior is controlled by the Logback appender settings in the relevant XML config files, logback.xml and framework-logging.xml. E.g.,

    <appender name="LOGGER_SYNC" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <file>${log_path:-}${HOSTNAME}_${app_name:-ECC}_LOG.00.txt</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
              <fileNamePattern>${log_path:-}${HOSTNAME}_${app_name:-ECC}_LOG.0%i.txt</fileNamePattern>
              <minIndex>1</minIndex>
              <maxIndex>9</maxIndex>
         </rollingPolicy>
         <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
              <maxFileSize>20MB</maxFileSize>
         </triggeringPolicy>
         <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
              <layout class="ch.qos.logback.classic.PatternLayout">
                   <pattern>%date{ISO8601} %-22(%.22thread) [%-5(%level)] %X{session.ae.system:-NOSESSION}/%X{session.ae.user:--} %X{session.ui:-NOUI} %X{session.ae.id} %X{perflogger.id} [%.40logger] - %msg%n</pattern>
              </layout>
         </encoder>
    </appender>

    Here we can see that file size is only determinant of whether the log file will be rotated. (A new log will be started when the existing log reaches 20 MB in size.)

    The documentation of the RollingFileAppender explains the various ways in which it can be configured, but I did not see a way to use more than one triggering policy with the same appender.

    On Stack Overflow I found a post by someone who developed his own fix by extending the DefaultTimeBasedFileNamingAndTriggeringPolicy class. I’m assuming the AWI developers just used the stock Logback. (There is also an open Jira ticket about this, LOGBACK-204.)

    If anyone figures out a way to make the AWI behave as desired, please let me know. If I find a solution, I will post it here.