log

splunkjs.Logger.log

Log to the console (equivalent to console.log)

Syntax

log: function()

error

splunkjs.Logger.error

Log error to the console (equivalent to console.error)

Syntax

error: function()

warn

splunkjs.Logger.warn

Log warning to the console (equivalent to console.warn)

Syntax

warn: function()

info

splunkjs.Logger.info

Log info to the console (equivalent to console.info)

Syntax

info: function()

printMessages

splunkjs.Logger.printMessages

Print out all messages retrieved from splunkd

Syntax

printMessages: function(allMessages)

setLevel

splunkjs.Logger.setLevel

Set the global logging level

Syntax

setLevel: function(level)

Parameters

Name Type Description
level String,Number

A string (ALL | INFO | WARN | ERROR | NONE) or number representing the log level

Examples

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