getLogLevel( successCallback, [errorCallback] ) method

Get log level.

This function gets current log level. Using this function, you can find out 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   success callback method upon success state.When 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) error callback method upon error state.For this method, error callback is optional. Since logger native code always passes log level to success callback, it is very unusual to fire error callback. (If cordova caused system exception, error callback could be fired by cordova)

Example

sap.Logger.getLogLevel(function(logLevel) {
  alert("Log level is " + logLevel);
}, function() {
  alert("Failed to get log level");
});

Source

logger.js, line 224.