Customizing rule trace messages


Each rule trace message is a standard cell trace message. The first part of this message is the standard cell trace message header. This header can be customized by using the TraceRuleHeader parameter in mcell.conf.

The header is specified as text and can contain references to parameters, by using the following designations to represent the associated parameters:

  • %I—Message id 
  • %F—Source file name 
  • %L—Source line number 
  • %M—KB module name 
  • %R—Rule name 
  • %P—Rule phase 
  • %H—Handle of the main event being processed (event_handle slot) 
  • %C—Class name of the main event being processed

For example, the following default TraceRuleHeader parameter value:

TraceRuleHeader= %F, %L: %P %R: %C #%H:

results in messages like:

mc_intevt.mrl, 42: new StbldStop: MC_CELL_STATBLD_STOP #118: Rule execution starting

The text of the message is retrieved from the message catalog through the message identifier and can be localized.

You can also write text to a trace module by using the trace_write primitive.

In mcell.conf, if you set TraceSrc=Yes, then a custom trace message similar to the following is displayed:

mcell: USER_101: Event #18: trace_write is at WARNING level

You also can customize the trace message to display the source file and line number, as follows

mcell: USER_101: tracePrimitive.mrl, 22: Event #18: trace_write is at WARNING level

For more information about the trace_write primitive, see trace_write-write-a-text-message-to-a-trace-module.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC ProactiveNet 9.6