Class YAHOO.widget.Logger
Package: | YAHOO.widget |
Class: | Logger |
Extends: | Object |
Defined In: | logger.js |
The singleton Logger class provides core log management functionality. Saves
logs written through the global YAHOO.log function or written by a LogWriter
instance. Provides access to logs for reading by a LogReader instance or
native browser console such as the Firebug extension to Firefox or Safari's
JavaScript console through integration with the console.log() method.
Public Properties
This class has no public properties.
Public Methods
|
disableBrowserConsole() : void |
Logger |
Disables output to the browser's global console.log() function, which is used
by the Firebug extension to Firefox as ... |
|
enableBrowserConsole() : void |
Logger |
Enables output to the browser's global console.log() function, which is used
by the Firebug extension to Firefox as w... |
|
getStack() : Object[] |
Logger |
Public accessor to internal stack of log message objects. |
|
getStartTime() : Date |
Logger |
Public accessor to internal start time. |
|
log(sMsg {String} , sCategory {String} , sSource {String} ) : void |
Logger |
Saves a log message to the stack and fires newLogEvent. If the log message is
assigned to an unknown category, create... |
|
reset() : void |
Logger |
Resets internal stack and startTime, enables Logger, and fires logResetEvent. |
Public Events
|
categoryCreateEvent : (sCategory {String} ) |
Logger |
Fired when a new category has been created. |
|
logResetEvent
: () |
Logger |
Fired when the Logger has been reset has been created. |
|
newLogEvent : (sMsg {String} ) |
Logger |
Fired when a new log message has been created. |
|
sourceCreateEvent : (sSource {String} ) |
Logger |
Fired when a new source has been named. |
Method Details
disableBrowserConsole
public function disableBrowserConsole()
Disables output to the browser's global console.log() function, which is used
by the Firebug extension to Firefox as well as Safari.
This method is defined by Logger.
enableBrowserConsole
public function enableBrowserConsole()
Enables output to the browser's global console.log() function, which is used
by the Firebug extension to Firefox as well as Safari.
This method is defined by Logger.
getStack
public function getStack()
Public accessor to internal stack of log message objects.
This method is defined by Logger.
getStartTime
public function getStartTime()
Public accessor to internal start time.
This method is defined by Logger.
log
public function log(sMsg {String}
, sCategory {String}
, sSource {String}
)
Saves a log message to the stack and fires newLogEvent. If the log message is
assigned to an unknown category, creates a new category. If the log message is
from an unknown source, creates a new source. If browser console is enabled,
outputs the log message to browser console.
Parameters:
{String}
: sMsgThe log message.
{String}
: sCategoryCategory of log message, or null.
{String}
: sSourceSource of LogWriter, or null if global.
Returns:
This method is defined by Logger.
reset
public function reset()
Resets internal stack and startTime, enables Logger, and fires logResetEvent.
This method is defined by Logger.
Event Details
categoryCreateEvent
public event categoryCreateEvent
Fired when a new category has been created.
Subscribers will be called with the following parameters:
{String}
: sCategoryCategory name.
This event is defined by Logger.
logResetEvent
public event logResetEvent
Fired when the Logger has been reset has been created.
Subscribers will be called with the following parameters:
This event is defined by Logger.
newLogEvent
public event newLogEvent
Fired when a new log message has been created.
Subscribers will be called with the following parameters:
{String}
: sMsgLog message.
This event is defined by Logger.
sourceCreateEvent
public event sourceCreateEvent
Fired when a new source has been named.
Subscribers will be called with the following parameters:
{String}
: sSourceSource name.
This event is defined by Logger.
yui-ext - Copyright © 2006 Jack Slocum. |
Yahoo! UI - Copyright © 2006 Yahoo! Inc.
All rights reserved.