error

splunkjs.Logger.error

Logs debug errors to the console. This function is the same as console.error.

Syntax

error: function()

info

splunkjs.Logger.info

Logs debug info to the console. This function is the same as console.info.

Syntax

info: function()

log

splunkjs.Logger.log

Logs debug messages to the console. This function is the same as console.log.

Syntax

log: function()

printMessages

splunkjs.Logger.printMessages

Prints all messages that are retrieved from the splunkd server to the console.

Syntax

printMessages: function(allMessages)

setLevel

splunkjs.Logger.setLevel

Sets the global logging level to indicate which information to log.

Syntax

setLevel: function(level)

Parameters

Name Type Description
level String,Number

A string or number ("ALL" = 4 | "INFO" = 3 | "WARN" = 2 | "ERROR" = 1 | "NONE" = 0) indicating the logging level.

Examples

 splunkjs.Logger.setLevel("WARN");
 splunkjs.Logger.setLevel(0); // equivalent to NONE

warn

splunkjs.Logger.warn

Logs debug warnings to the console. This function is the same as console.warn.

Syntax

warn: function()