Debug - globules-io/OGX.JS GitHub Wiki
OGX.JS comes, since v1.1, with it's own console, only in dev builds.
Levels
The debugger has 6 levels of debugging.
0 => No output
1 => Errors only
2 => Warnings
3 => Info
4 => Verbose
5 => Details
You can set the output level by passing the level(s) you want to listen to.
OGX.Debug.level(1); //errors
OGX.Debug.level(1, 2); //errors and warnings
Or retrieve the current level(s)
OGX.Debug.level();
Log
You can either use
debug
orOGX.Debug.log
, and you must pass the level first
OGX.Debug.log(3, 'My Stuff worked!');
debug(3, 'My Stuff worked!');