Jaxer.Log.ModuleLogger : Object
Return to: Jaxer Framework index

Object created by the global Log.forModule("...") method for module-specific logging.

Platform Support

Jaxer Server FrameworkJaxer Client Framework
1.0no

Constructors

ConstructorActionJaxer Server FrameworkJaxer Client Framework
Jaxer.Log.ModuleLogger Constructor(String moduleName, Jaxer.Log.Level The) : Jaxer.Log.ModuleLogger
An object that's created only through the global Log.forModule("...") method for module-specific logging. Usually you create such a logger at the beginning of your module, and then use it throughout your module for logging at various levels. It has its own level, so you can control the verbosity of logging per module.
Show Details1.0no

Jaxer.Log.ModuleLogger(String moduleName, Jaxer.Log.Level The) : Jaxer.Log.ModuleLogger

An object that's created only through the global Log.forModule("...") method for module-specific logging. Usually you create such a logger at the beginning of your module, and then use it throughout your module for logging at various levels. It has its own level, so you can control the verbosity of logging per module.

Parameters
StringmoduleNameThe name to use for the module
Jaxer.Log.LevelThelog level for the module

Returns
Jaxer.Log.ModuleLoggerReturns an instance of ModuleLogger.

Functions

MethodActionJaxer Server FrameworkJaxer Client Framework
debug(String message, [Error exception,] [Function inFunction]) : void
Logs a message at the "DEBUG" level for this module. The message will only be appended to the log if the level for this 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 Details1.0no

Parameters
StringmessageThe message to append to the log. The timestamp, modulename, and terminating newline will be added automatically.
Errorexception(optional)An optional error or exception to be logged with this message
FunctioninFunction(optional)An optional indication of which function this message should appear to originate from. By default, it's the function that called this logging method.

error(String message, [Error exception,] [Function inFunction]) : void
Logs a message at the "ERROR" level for this module. The message will only be appended to the log if the level for this module (and that appender) is set at or below Jaxer.Log.ERROR. Use this to log non-fatal but nonetheless real errors.
Show Details1.0no

Parameters
StringmessageTthe message to append to the log. The timestamp, modulename, and terminating newline will be added automatically.
Errorexception(optional)An optional error or exception to be logged with this message
FunctioninFunction(optional)An optional indication of which function this message should appear to originate from. By default, it's the function that called this logging method.

fatal(String message, [Error exception,] [Function inFunction]) : void
Logs a message at the "FATAL" level for this module. The message will only be appended to the log if the level for this module (and that appender) is set at or below Jaxer.Log.FATAL. Use this to log the most serious errors.
Show Details1.0no

Parameters
StringmessageThe message to append to the log. The timestamp, modulename, and terminating newline will be added automatically.
Errorexception(optional)An optional error or exception to be logged with this message
FunctioninFunction(optional)An optional indication of which function this message should appear to originate from. By default, it's the function that called this logging method.

getLevel() : Jaxer.Log.Level
Gets the level to which this ModuleLogger is set -- appending messages below this level will do nothing
Show Details1.0no

Returns
Jaxer.Log.LevelThe current level

info(String message, [Error exception,] [Function inFunction]) : void
Logs a message at the "INFO" level for this module. The message will only be appended to the log if the level for this 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 Details1.0no

Parameters
StringmessageThe message to append to the log. The timestamp, modulename, and terminating newline will be added automatically.
Errorexception(optional)An optional error or exception to be logged with this message
FunctioninFunction(optional)An optional indication of which function this message should appear to originate from. By default, it's the function that called this logging method.

setLevel(Jaxer.Log.Level level) : void
Sets the level below which this moduleLogger will not log messages.
Show Details1.0no

Parameters
Jaxer.Log.LevellevelThe minimum loggable level. Should be one of Jaxer.Log.TRACE, Jaxer.Log.DEBUG, Jaxer.Log.INFO, Jaxer.Log.WARN, Jaxer.Log.ERROR, Jaxer.Log.FATAL.

trace(String message, [Error exception,] [Function inFunction]) : void
Logs a message at the "TRACE" level for this module. The message will only be appended to the log if the level for this 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 Details1.0no

Parameters
StringmessageThe message to append to the log. The timestamp, modulename, and terminating newline will be added automatically.
Errorexception(optional)An optional error or exception to be logged with this message
FunctioninFunction(optional)An optional indication of which function this message should appear to originate from. By default, it's the function that called this logging method.

warn(String message, [Error exception,] [Function inFunction]) : void
Logs a message at the "WARN" level for this module. The message will only be appended to the log if the level for this 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 Details1.0no

Parameters
StringmessageThe message to append to the log. The timestamp, modulename, and terminating newline will be added automatically.
Errorexception(optional)An optional error or exception to be logged with this message
FunctioninFunction(optional)An optional indication of which function this message should appear to originate from. By default, it's the function that called this logging method.

aptana_docs