Skip to main content
Pentaho Documentation

IManager

pentaho.debug.IManager

The debug.IManager interface represents a manager of the debugging level for several code contexts.

Source: doc-js/pentaho/debug/IManager.jsdoc, line 17

See also:  pentaho.debug.manager

Methods

Name Description
configure(spec)

Configures the debugging manager given a specification.

getLevel(module) : pentaho.debug.Levels

Gets the maximum active debugging level, optionally for a given AMD module.

setLevel(level, module)

Sets the maximum active debugging level, optionally for a given AMD module.

testLevel(level, module) : boolean

Tests if a debugging level is active, optionally for a given AMD module.

Methods Details

configure(spec)

Configures the debugging manager given a specification.

Source: doc-js/pentaho/debug/IManager.jsdoc, line 38

Parameters:
Name Default Value Summary
spec : object
 
Optional

The debugging configuration.

Parameters:
Name Default Value Summary
level : pentaho.debug.Levels | string
 
Optional

The default debugging level. The url debugging level, when specified, takes precedence over this. When neither is specified, defaults to pentaho.debug.Levels#error.

modules : Object.<string, (pentaho.debug.Levels | string)>
 
Optional

Debugging levels per absolute AMD module id.

getLevel(module) : pentaho.debug.Levels

Gets the maximum active debugging level, optionally for a given AMD module.

Source: doc-js/pentaho/debug/IManager.jsdoc, line 52

Parameters:
Name Default Value Summary
module : Object | string
 
Optional

An AMD module object, as returned by requesting the "module" dependency, or a module id. When unspecified, the default debugging level is returned.

Returns:
Name Description
pentaho.debug.Levels

The debugging level.

Example

define([
 "module",
 "pentaho/debug",
 "pentaho/debug/Levels"
], function(module, debugMgr, DebugLevels) {

 var isDebugEnabled = debugMgr.getLevel(module) >= DebugLevels.debug;

 // ...
});
setLevel(level, module)

Sets the maximum active debugging level, optionally for a given AMD module.

Source: doc-js/pentaho/debug/IManager.jsdoc, line 26

Parameters:
Name Default Value Summary
level : pentaho.debug.Levels | string

The debugging level.

module : Object | string
 
Optional

An AMD module object, as returned by requesting the "module" dependency, or a module id. When unspecified, the default debugging level is set.

testLevel(level, module) : boolean

Tests if a debugging level is active, optionally for a given AMD module.

Source: doc-js/pentaho/debug/IManager.jsdoc, line 78

Parameters:
Name Default Value Summary
level : pentaho.debug.Levels | string

The debugging level to test.

module : Object | string
 
Optional

An AMD module object, as returned by requesting the "module" dependency, or a module id. When unspecified, the default debugging level is used.

Returns:
Name Description
boolean

true if the given debugging level is active; false, otherwise.

Example

define([
 "module",
 pentaho/debug
], function(module, debugMgr) {

 var isDebugEnabled = debugMgr.testLevel("debug", module);

 // ...
});