How to change the timezone in integration agent log messages

By default, the integration agent uses the same timezone as the host operating system when writing timestamped messages to its log files. If this default does not meet your needs, you can specify a different time zone.

To specify a different timezone:

  1. Download apache-log4j-extras-1.2.17.jar from http://archive.apache.org/dist/logging/log4j/extras/1.2.17/ and put it in <IAHOME>\lib\mule-1.4.3\lib\opt.
  2. In <IAHOME>\conf\log4j.xml replace:
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy/MM/dd HH:mm:ss.SSS Z z} [%t] %p - %m%n"/>

   with:

<layout class="org.apache.log4j.EnhancedPatternLayout">
<param name="ConversionPattern" value="%d{yyyy/MM/dd HH:mm:ss.SSS Z z}{GMT}  [%t] %p - %m%n"/>
  1. Replace {GMT} with the timezone that you want (eg, {GMT+2}).
  2. Save the file and restart the integration agent.

Note that the above instructions will only affect the timestamps in the IA log file.  If you use the IA in console mode and want the console messages to use the same timestamps, then make the same change in the "consoleAppender" section of log4j.xml

This configuration has been validated with integration agent 5.2.2 but has not been subjected to rigorous testing, so we recommend that you verify correct operation in a staging environment before installing it on a production system.

xMatters Reference

DOC-4308, COR-3050

Have more questions? Submit a request

1 Comments

  • 0
    Avatar
    Jeremy Brown

    Updated for compatibility with IA 5.2.2

Please sign in to leave a comment.
Powered by Zendesk