Class blade.util.Logger
Object
|
+--blade.util.Logger
- class
blade.util.Logger
A message logger
Logger is my first attempt at mimicking some of the behavior in Log4j in order to facilitate
debugging of complex js programs. Logged events are timestamped in ms, and different logging levels are
displayed in different colors. Still missing: defining the logging level on a per-class basis.
Defined in util.js
Method Summary |
function
|
debug(str)
Writes a debug statement
|
function
|
error(str)
Writes an error statement
|
function
|
fatal(str)
Writes a fatal error statement
|
function
|
log(str)
Writes a log statement
|
function
|
setLevel(level)
Sets the minimum level necessary for output to show up.
|
function
|
warn(str)
Writes a warning statement
|
blade.util.Logger
function blade.util.Logger(appender)
Parameters:
appender
- optional object to write the log to. If no appender is specified, the Logger creates a pop-under window to log information.
debug
function debug(str)
error
function error(str)
Writes an error statement
fatal
function fatal(str)
Writes a fatal error statement
log
function log(str)
setLevel
function setLevel(level)
Sets the minimum level necessary for output to show up.
Parameters:
level
- a string representing the level, e.g. "log", "warn"
warn
function warn(str)
Writes a warning statement