Integration with Other Applications > Introduction to Windchill ESI > Using Windchill Integration for MES > Logging and Messaging
  
Logging and Messaging
Message logs can be viewed from the Windchill ESI services components as well as from Windchill EAI components.
Windchill ESI services log various kinds of messages by using Windchill's log4j based logging capabilities.
To enable Windchill ESI services to write messages to the Windchill MethodServer logs, use the following procedure:
1. Navigate to and modify the following file:
<wt_home>/codebase/WEB-INF/log4jMethodServer.properties
2. To enable logging of debug messages for all classes of ESI services add the following entry:
log4j.logger.com.ptc.windchill.esi=DEBUG
To enable logging for all types of messages for all classes of ESI services add the following entry file:
log4j.logger.com.ptc.windchill.esi=ALL
Logs can also be enabled for specific packages or classes. For example, to enable logging for debug messages for all classes in the package com.ptc.windchill.esi.txn you would enter the following:
log4j.logger.com.ptc.windchill.esi.txn=DEBUG
To enable logging of all types of messages (for example, Debug, Info, Warn, Trace) for the class com.ptc.windchill.esi.svc.StandardESIService you would enter the following:
log4j.logger.com.ptc.windchill.esi.svc.StandardESIService=ALL
* 
To turn off logging completely set the relevant property to OFF. For example, to do this for all classes in the package com.ptc.windchill.esi.txn, you would enter the following:
log4j.logger.com.ptc.windchill.esi.txn=OFF
To enable or disable logging in a running method server instance use the following procedure:
From a Windchill shell run the following commands:
To enable: windchill wt.util.jmx.SetLogLevel -ms com.ptc.windchill.esi DEBUG
To disable: windchill wt.util.jmx.SetLogLevel -ms com.ptc.windchill.esi
* 
For more information on logging see Managing Windchill Logging.
Return Messaging to Windchill
Windchill Integration for MES sends a PostResult message for the primary business object, for every transaction in a given release. It also sends a subtransaction PostResult message for every object/action/distribution target (the objects are Parts, BOMs, Documents and their associations, and their related objects and associations, CNs, manufacturing objects and resources). The Message field of the ESIPostResult schema is a string field that contains explanatory text about the publish status of the object and is populated with several pieces of information. For more information on the structure of the PostResult schema, see the Implementing Windchill ESI.
* 
What is described above is the default behavior and provides for open loop transactions. To configure for closed loop transactions, the Windchill Integration for MES preference Enable Post Result in the Transaction category should be set to “No”, so that the PostResult RPC is not invoked once the data reaches an Windchill Integration for MES distribution target. Besides this setting, some customization would be needed to actually publish the exported data to the destination ERP system and also invoke the PostResult RPC to record the publish status in Windchill. For more information, see the Introduction to ERP Connector.