Previous Topic: mvelInfo FunctionNext Topic: mvelError Function


mvelWarn Function

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

Syntax

This function has the following format:

String mvelWarn (Array objects)

Parameters

objects

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

mvelWarn([“cpmCPUTotal5minRev=”, cpmCPUTotal5minRev])

Result:

Null

Result (karaf.log):

MVEL warn: cpmCPUTotal5minRev=15

Advanced Example

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

Result:

12

Result (karaf.log):

MVEL warn: cpmCPUTotal5minRev=15 cpmCPUTotal10minRev=12