使用 plugin.xml 文件来配置插件记录

对于实现公共记录的插件,应该向其 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 元素设置的有效级别属性如下:

CommonBaseEvent 元素为插件的定制公共基本事件工厂指定缺省值,这些缺省值可用来创建配置的公共基本事件。此元素也是可选的。

相关参考
设置插件记录首选项
日志和跟踪分析器的记录首选项