| Previous | Next | Frames | No Frames |
| Summary: Field | Property | Contructor | Method | Detail: Field | Property | Contructor | Method |
Object | +--xp.system.Logger
Field Summary | |
| public static | BRIEF: Number |
| log verbosity constant - only info level logging | |
| public static | DEBUG: Number |
| log verbosity constant info,warning and debug logging | |
| public static | enableBroadcaster: Boolean |
| Enables broadcasting log events | |
| public static | enableLocalConnection |
| Enables broadcasting log events via a local connection | |
| public static | enableProfiling |
| Enables add profiling info to all log calls | |
| public static | enableTrace: Boolean |
| Enables broadcasting log events via trace | |
| public static | ERROR: Number |
| Event level constant error message | |
| public static | INFO: Number |
| Event level constant info message | |
| public static | levels: Array |
| array of event level names ERROR,WARNING,INFO | |
| public static | NONE: Number |
| log verbosity constant - no message logging | |
| public static | VERBOSE: Number |
| log verbosity constant info and warning logging | |
| public static | WARN: Number |
| Event level constant warning message | |
Constructor | |
| public | Logger ( logLevel: Number, logName: String) |
| Create a new log instance | |
Method Summary | |
| public | error ( msg: Object ): Void |
| Log a message object with the ERROR Level. | |
| public | info ( msg: Object ): Void |
| Log a message object with the INFO Level. | |
| public static | initLogger ( output: Boolean, broadcast: Boolean, local: Boolean, profile: Boolean ) |
| Initialize the global logger | |
| public | isErrorEnabled ( ): Boolean |
| Check whether this logger is enabled for the error Level | |
| public | isInfoEnabled ( ): Boolean |
| Check whether this logger is enabled for the info Level | |
| public | isWarnEnabled ( ): Boolean |
| Check whether this logger is enabled for the warn Level | |
| public | log ( level: Number, msg: Object ): Void |
| Log a message. This is the most generic printing method | |
| public | onLog ( message ): Void |
| Callback for log messages | |
| public | warn ( msg: Object ): Void |
| Log a message object with the WARN Level | |
| public static var BRIEF: Number |
| log verbosity constant - only info level logging |
| public static var DEBUG: Number |
| log verbosity constant info,warning and debug logging |
| public static var enableBroadcaster: Boolean |
| Enables broadcasting log events If true Logger broadcast the onLog event so that other classes for other appenders, default is false |
| public static var enableLocalConnection |
| Enables broadcasting log events via a local connection If true Logger broadcast the onLog event to other applications via a local connection default is false |
| public static var enableProfiling |
| Enables add profiling info to all log calls If true Logger broadcast messages included profiling data |
| public static var enableTrace: Boolean |
| Enables broadcasting log events via trace If true Logger broadcast the onLog event to trace, default is true |
| public static var ERROR: Number |
| Event level constant error message |
| public static var INFO: Number |
| Event level constant info message |
| public static var levels: Array |
| array of event level names ERROR,WARNING,INFO |
| public static var NONE: Number |
| log verbosity constant - no message logging |
| public static var VERBOSE: Number |
| log verbosity constant info and warning logging |
| public static var WARN: Number |
| Event level constant warning message |
|
| Create a new log instance | ||||||
|
|
| Log a message object with the ERROR Level. This method first checks if this logger is ERROR enabled by comparing the level of this logger with WARN Level. If the logger is ERROR enabled, then it converts the message object passed as parameter to a string. | |||
|
|
| Log a message object with the INFO Level. This method first checks if this logger is INFO enabled by comparing the level of this logger with WARN Level. If the logger is INFO enabled, then it converts the message object passed as parameter to a string. | |||
|
|
| Initialize the global logger | ||||||||||||
|
|
| Check whether this logger is enabled for the error Level |
|
|
| Check whether this logger is enabled for the info Level |
|
|
| Check whether this logger is enabled for the warn Level |
|
|
| Log a message. This is the most generic printing method | ||||||
|
|
| Callback for log messages | |||
|
|
| Log a message object with the WARN Level This method first checks if this logger is WARN enabled by comparing the level of this logger with WARN Level. If the logger is WARN enabled, then it converts the message object passed as parameter to a string. | |||
|
Supportgs logging to trace, broadcasting a log event, and logging to a local connection
You enable logging by calling the initLogger method once per application then call the relevant logger method to log events
You can access the logger either through the static var logger in the Logger class or through the global variable logger
Inititlize Logger Call logger to append log events
//log events _global.logger.error("RPC call failed - no valid connection"); _global.logger.warn("Were running low on coffe"); _global.logger.info("You should slow down");