IBM Support

How does one create individual logs for each Agent/Integration Server?

Question & Answer


Question

How does one create individual logs for each Agent/Integration Server?

Answer

In MCF 8.5, the log4jconfig.xml defines an AGENT_LOG_APPENDER. One needs to define this APPENDER in the log4jconfig.xml if on MCF8.0 
 
1) Modify AGENT_LOG_APPENDER appender inside log4jconfig.xml. Change 'file' parameter as shown here.
 
<appender name="AGENT_LOG_APPENDER" class="com.sterlingcommerce.woodstock.util.frame.logex.SCIAppender"> 
<param name="rotateLogs" value="true" /> 
<param name="maxLogSize" value="80KB" /> 
<param name="file" value="<LOG_DIR>/sscap${LOG_NAME}.log" /> 
<layout class="org.apache.log4j.PatternLayout"> 
<param name="ConversionPattern" value="%d:%-7p:%t: %-60m [%X{APPUSERID.EN_US}]: %-25c{1.EN_US}%n"/> 
</layout> 
</appender> 
 
2) Then pass the system property -DLOG_NAME=<SERVER_NAME> in startIntegrationServer.cmd or .sh file. The startIntegrationServer file should look like: 
 
java -DLOG_NAME=%SERVERNAME% com.yantra.integration.adapter.IntegrationAdapter %SERVERNAME%  (if on Windows).
 
where SERVERNAME is defined earlier in the file to be the argument passed to the startIntegrationServer.cmd.
 
E.g. If one needs to start the Integration Server "server1", start it as follows -> startIntegrationServer.cmd/sh server1
  
With the above defined AGENT_LOG_APPENDER from the log4jconfig.xml, the agent log messages will be logged into a file called "sscapserver1.log". And so on for different server names.
 
3) Ensure that the Agent/Integration server picks up the correct log4jconfig.xml. If the log4jconfig.xml is customized, then make these changes in the customized log4jconfig.xml.
 

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

HTG3060

Document Information

Modified date:
16 June 2018

UID

swg21562328