getLogLevel( successCallback, [errorCallback] ) method

Get log level.

This function gets the current log level. Use this function to know what kind of log level messages can be generated and affected at the current log level.

Syntax

<static> getLogLevel( successCallback, [errorCallback] )

Parameters

Name Type Argument Description
successCallback function   Callback function called when the log level has been successfully retrieved.When the current log level is successfully retrieved, it is fired with the current log level. [DEBUG, INFO, WARN, ERROR] Log level of String type will be passed to success callback. Default log level is ERROR.
errorCallback function (optional) Callback function called when an error occurs while getting the current log level.For this method, error callback is optional. 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.getLogLevel(successCallback, errorCallback);

function successCallback(logLevel) {
    alert("Log level is " + logLevel);
}

function errorCallback() {
    alert("Failed to get log level");
}

Source

logger.js, line 228.