Previous Topic: mvelWarn FunctionNext Topic: mvelDebug Function


mvelError Function

This function populates the ERROR 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 mvelError function allows you to view the input poll values to determine where the calculation went wrong.

Syntax

This function has the following format:

String mvelError (Array objects)

Parameters

objects

The object array is logged under the ERROR 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:

mvelError([“cpmCPUTotal5minRev=”, cpmCPUTotal5minRev])

Result:

Null

Result (karaf.log):

MVEL error: cpmCPUTotal5minRev=15

Advanced Example

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

Result:

12

Result (karaf.log):

MVEL error: cpmCPUTotal5minRev=15 cpmCPUTotal10minRev=12