与其他应用程序集成 > 与生产系统集成 > 使用 Windchill Integration for MES > 日志记录和消息传送
  
日志记录和消息传送
消息日志可以从 Windchill ESI 服务组件以及 Windchill EAI 组件来查看。
Windchill ESI 服务使用基于 Windchill 的 log4j 日志记录功能记录各种类型的消息。
要启用 Windchill ESI 服务将消息写入到 Windchill MethodServer 日志,使用下列步骤:
1. 导航到下面的文件并进行修改:
<wt_home>/codebase/WEB-INF/log4jMethodServer.properties
2. 要记录 ESI 服务的所有类的调试消息,请添加下列条目:
log4j.logger.com.ptc.windchill.esi=DEBUG
要记录 ESI 服务的所有类的所有消息类型,请添加下列条目文件:
log4j.logger.com.ptc.windchill.esi=ALL
也可以对特定的包或类进行记录。例如,要启用 com.ptc.windchill.esi.txn 包中所有类的调试消息的日志记录功能,需输入以下内容:
log4j.logger.com.ptc.windchill.esi.txn=DEBUG
要记录 com.ptc.windchill.esi.svc.StandardESIService 类的所有消息类型 (例如,Debug、Info、Warn、Trace),请输入下列内容:
log4j.logger.com.ptc.windchill.esi.svc.StandardESIService=ALL
* 
要完全关闭日志记录,请将相关属性设置为 OFF。例如,为此对于 com.ptc.windchill.esi.txn 包中所有的类,要输入下列内容:
log4j.logger.com.ptc.windchill.esi.txn=OFF
要启用或禁用在运行的方法服务器实例中的日志记录,执行下列步骤:
在 Windchill shell 中,运行以下命令:
要启用该功能:windchill wt.util.jmx.SetLogLevel -ms com.ptc.windchill.esi DEBUG
要禁用:windchill wt.util.jmx.SetLogLevel -ms com.ptc.windchill.esi
* 
有关日志记录的详细信息,请参阅管理 Windchill 日志记录