Previous Topic: mvelError FunctionNext Topic: mvelTrace Function


mvelDebug Function

This function populates the DEBUG level of the karaf.log file with the input parameters. Use this function to log the polled values from a report that returns a result that you believe is incorrect.

The poll log of the Data Collector only shows the values of the polled attributes, while the report only shows the result of the calculation. The mvelDebug function allows you to view the input poll values to determine where the calculation went wrong.

Syntax

This function has the following format:

String mvelDebug (Array objects)

Parameters

objects

The object array is logged under the DEBUG level in the karaf.log file of the Data Collector.

Return Values

Null

Examples

The following expression logs cpmCPUTotal5minRev in the karaf.log file.

Expression:

mvelDebug([“cpmCPUTotal5minRev=”, cpmCPUTotal5minRev])

Result:

Null

Result (karaf.log):

MVEL debug: cpmCPUTotal5minRev=15

Advanced Example

mvelDebug([“cpmCPUTotal5minRev=”, cpmCPUTotal5minRev, “ cpmCPUTotal10minRev=”, cpmCPUTotal10minRev]); cpmCPUTotal10minRev;

Result:

12

Result (karaf.log):

MVEL debug: cpmCPUTotal5minRev=15 cpmCPUTotal10minRev=12