error( message, [tag], [successCallback], [errorCallback] ) method

Add an error message to the log.

This function logs messages with the 'ERROR' log level.

Syntax

<static> error( message, [tag], [successCallback], [errorCallback] )

Parameters

Name Type Argument Description
message String   Log message to be logged.
tag String (optional) Tag value added to the log entry used to indicate the source of the message (for example, SMP_LOGGER, SMP_AUTHPROXY).
successCallback function (optional) Callback function called when the message has been successfully added to the log.No object will be passed to success callback.
errorCallback function (optional) Callback function called when an error occurs while adding the message to the log.Since Kapsel Logger native code will always call the success callback function, the errorCallback function will be executed by Cordova if an error or exception occurs while making the call to the plugin.

Example

sap.Logger.error("error message", "ERROR_TAG");

Source

logger.js, line 152.