Log is a static object meant to be shared across the framework and perhaps even the user's code. In a module, use it to create
a module-specific logger and then log with it.
Platform Support
Jaxer Server Framework | Jaxer Client Framework | 1.0 | no |
---|
Functions
![]() |
||||||||||||
Method | Action | Jaxer Server Framework | Jaxer Client Framework | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
static addAppender(String name, Jaxer.Log.Appender appender) :
void
Add an appender to the referenced Log object
(Advanced) |
Show Details | 1.0 | no | |||||||||
Parameters
|
||||||||||||
static getAppender(String name) : Jaxer.Log.Appender
Get an appender reference from the referenced Log object
(Advanced) |
Show Details | 1.0 | no | |||||||||
Parameters
Returns
|
||||||||||||
static getLevelNames() : Array<String>
Return a array of implemented Logger levelnames e.g. "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL"
(Advanced) |
Show Details | 1.0 | no | |||||||||
Returns
|
||||||||||||
static getSortedModuleNames() : Array
Gets a sorted array of all the currently-defined modules.
(Advanced) |
Show Details | 1.0 | no | |||||||||
Returns
|
||||||||||||
static removeAppender(String name) :
void
Remove the specified appender from the referenced Log object
(Advanced) |
Show Details | 1.0 | no | |||||||||
Parameters
|
||||||||||||
static debug(String message, [Error exception,] [Function inFunction]) :
void
Logs a message at the "DEBUG" level. The message will only be appended to the log if the level for that module (and that appender)
is set at or below Jaxer.Log.DEBUG. This is the second-most verbose level - instrument your code with debug() calls in those
places where debugging is likely to benefit from them.
|
Show Details | 1.0 | no | |||||||||
Parameters
|
||||||||||||
static error(String message, [Error exception,] [Function inFunction]) :
void
Logs a message at the "ERROR" level. The message will only be appended to the log if the level for that module (and that appender)
is set at or below Jaxer.Log.ERROR. Use this to log non-fatal but nonetheless real errors.
|
Show Details | 1.0 | no | |||||||||
Parameters
|
||||||||||||
static fatal(String message, [Error exception,] [Function inFunction]) :
void
Logs a message at the "FATAL" level. The message will only be appended to the log if the level for that module (and that appender)
is set at or below Jaxer.Log.FATAL. Use this to log the most serious errors.
|
Show Details | 1.0 | no | |||||||||
Parameters
|
||||||||||||
static forModule(String moduleName) : Jaxer.Log.ModuleLogger
Lazily creates a logger for the given module name, if needed, and in any case returns it. The referenced Log object knows
to create log entries marked as belonging to the specific module.
|
Show Details | 1.0 | no | |||||||||
Parameters
Returns
|
||||||||||||
static getLevel() : Jaxer.Log.Level
Get the logging level of the generic logger
|
Show Details | 1.0 | no | |||||||||
Returns
|
||||||||||||
static getStackTrace([String linePrefix,] [Number framesToSkip]) : String
Get the current JavaScript stack trace.
|
Show Details | 1.0 | no | |||||||||
Parameters
Returns
|
||||||||||||
static hasModule(String moduleName) : Boolean
Returns a boolean to indicate whether the referenced Log object is wired to do logging for the provided modulename
|
Show Details | 1.0 | no | |||||||||
Parameters
Returns
|
||||||||||||
static info(String message, [Error exception,] [Function inFunction]) :
void
Logs a message at the "INFO" level. The message will only be appended to the log if the level for that module (and that appender)
is set at or below Jaxer.Log.INFO. By default, modules are set to show messages at this level, so use info() when you want
to show log messages without needing to set the level to more verbose than usual, but don't keep info() messages in your code
long term.
|
Show Details | 1.0 | no | |||||||||
Parameters
|
||||||||||||
static setAllModuleLevels(Jaxer.Log.Level level) :
void
Set the logging level on ALL modules to level provided for the referenced Log object
|
Show Details | 1.0 | no | |||||||||
Parameters
|
||||||||||||
static setLevel(Jaxer.Log.Level level) :
void
Set the logging level for the generic logger (the one that's not module- specific)
|
Show Details | 1.0 | no | |||||||||
Parameters
|
||||||||||||
static trace(String message, [Error exception,] [Function inFunction]) :
void
Logs a message at the "TRACE" level. The message will only be appended to the log if the level for that module (and that appender)
is set at Jaxer.Log.TRACE. This is the most verbose level - instrument your code liberally with trace() calls to be able to
pinpoint any issues.
|
Show Details | 1.0 | no | |||||||||
Parameters
|
||||||||||||
static warn(String message, [Error exception,] [Function inFunction]) :
void
Logs a message at the "WARN" level. The message will only be appended to the log if the level for that module (and that appender)
is set at or below Jaxer.Log.WARN. Use this to warn of any unusual or unexpected, but not necessarily erroneous, conditions.
|
Show Details | 1.0 | no | |||||||||
Parameters
|