对于实现公共记录的插件,应该向其 plugin.xml 文件添加以下扩展点以便配置记录级别和公共基本事件工厂:
<extension point="com.ibm.etools.common.logging.commonLoggingOptions"> <options level="ALL"/> <CommonBaseEvent msg="Common Base Event Template Message"> <sourceComponentId application="Common Logging" component="sample" componentIdType="Application" subComponent="Log" componentType="Eclipse Plugins"/> <situation categoryName="ReportSituation"> <situationType reasoningScope="INTERNAL" reportCategory="LOG"/> </situation> </CommonBaseEvent> </extension>options 元素的级别属性是与插件相关联的缺省记录级别。options 元素是可选的。如果未指定 options,则缺省记录级别为 NONE。
options 元素设置的有效级别属性如下:
SEVERE(最高级别;记录最少的信息)
相关参考
设置插件记录首选项
日志和跟踪分析器的记录首选项
(C) Copyright IBM Corporation 2000, 2006. All Rights Reserved.