Class ecm.Logger
Provides logging capabilities. Logging information is displayed in the JavaScript console and is recorded in an internal trace table that can be dumped to see recent activity.
You do not need to create an instance of this class to send logging events. By including this JavaScript at ecm.logger, an instance is automatically available. A class will normally inherit the ecm.LoggerMixin to simplify access to the logging functions.
Four levels of logging are available:
- Error
- Warning
- Information
- Debug
Defined in: <ecm\Logger.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Method Summary
Method Attributes | Method Name and Description |
---|---|
Returns the current log level.
|
|
Returns true if logging is being written to the JavaScript console.
|
|
initLogger(logLevel, useConsole)
Initializes logging.
|
|
isDebug()
Returns true if the log level is 4 or higher.
|
|
logDebug(location, message, extra)
Logs a debug message.
|
|
logEntry(location, extra)
Logs a function entry.
|
|
logError(location, message, extra)
Logs an error message.
|
|
logExit(location, extra)
Logs a function exit.
|
|
logInfo(location, message, extra)
Logs an informational message.
|
|
logWarning(location, message, extra)
Logs a warning message.
|
Method Detail
getLogLevel()
Returns the current log level.
getUseConsole()
Returns true if logging is being written to the JavaScript console.
initLogger(logLevel, useConsole)
Initializes logging.
- Parameters:
- logLevel
- the logging level to use (as defined in the class description).
- useConsole
- boolean, if true logging is written to the JavaScript console. If false a popup window is displayed and logging is written to that window.
isDebug()
Returns true if the log level is 4 or higher.
logDebug(location, message, extra)
Logs a debug message.
- Parameters:
- location
- message
- extra
logEntry(location, extra)
Logs a function entry.
- Parameters:
- location
- extra
logError(location, message, extra)
Logs an error message.
- Parameters:
- location
- message
- extra
logExit(location, extra)
Logs a function exit.
- Parameters:
- location
- extra
logInfo(location, message, extra)
Logs an informational message.
- Parameters:
- location
- message
- extra
logWarning(location, message, extra)
Logs a warning message.
- Parameters:
- location
- message
- extra