Module gamejs/logging
Static methods for logging and setting the log level. All logging functions (info()
, debug()
, etc.) take any number of arguments and will print them in one line.
debug (message,...)
Parameters
String |
message,... |
to log |
error (message,...)
Parameters
String |
message,... |
to log |
info (message,...)
Parameters
String |
message,... |
to log |
log (message,...)
Log a msg to the console if console is enable
Parameters
String |
message,... |
the msg to log |
set logLevel as string or number
- 0 = info
- 1 = warn
- 2 = error
- 3 = fatal
Example
gamejs.setLogLevel(0); // debug
gamejs.setLogLevel('error'); // equal to setLogLevel(2)
warn (message,...)
Parameters
String |
message,... |
to log |