private
void
_createCategoryCheckbox
(
sCategory
)
Creates the UI for a category filter in the LogReader footer element.
- Parameters:
-
sCategory <String>
Category name.
- Returns:
void
private
void
_createSourceCheckbox
(
sSource
)
Creates a checkbox in the LogReader footer element to filter by source.
- Parameters:
-
sSource <String>
Source name.
- Returns:
void
private
void
_filterLogs
(
)
Reprints all log messages in the stack through filters.
private
void
_onCategoryCreate
(
sType
,
aArgs
,
oSelf
)
Handles Logger's categoryCreateEvent.
- Parameters:
-
sType <String>
The event.
-
aArgs <Object[]>
Data passed from event firer.
-
oSelf <Object>
The LogReader instance.
- Returns:
void
private
void
_onCheckCategory
(
v
,
oSelf
)
Handles check events on the category filter checkboxes.
- Parameters:
-
v <HTMLEvent>
The click event.
-
oSelf <Object>
The LogReader instance.
- Returns:
void
private
void
_onCheckSource
(
v
,
oSelf
)
Handles check events on the category filter checkboxes.
- Parameters:
-
v <HTMLEvent>
The click event.
-
oSelf <Object>
The LogReader instance.
- Returns:
void
private
void
_onClickClearBtn
(
v
,
oSelf
)
Handles click events on the clear button.
- Parameters:
-
v <HTMLEvent>
The click event.
-
oSelf <Object>
The LogReader instance.
- Returns:
void
private
void
_onClickCollapseBtn
(
v
,
oSelf
)
Handles click events on the collapse button.
- Parameters:
-
v <HTMLEvent>
The click event.
-
oSelf <Object>
The LogReader instance
- Returns:
void
private
void
_onClickPauseBtn
(
v
,
oSelf
)
Handles click events on the pause button.
- Parameters:
-
v <HTMLEvent>
The click event.
-
oSelf <Object>
The LogReader instance.
- Returns:
void
private
void
_onNewLog
(
sType
,
aArgs
,
oSelf
)
Handles Logger's newLogEvent.
- Parameters:
-
sType <String>
The event.
-
aArgs <Object[]>
Data passed from event firer.
-
oSelf <Object>
The LogReader instance.
- Returns:
void
private
void
_onReset
(
sType
,
aArgs
,
oSelf
)
Handles Logger's resetEvent.
- Parameters:
-
sType <String>
The event.
-
aArgs <Object[]>
Data passed from event firer.
-
oSelf <Object>
The LogReader instance.
- Returns:
void
private
void
_onSourceCreate
(
sType
,
aArgs
,
oSelf
)
Handles Logger's sourceCreateEvent.
- Parameters:
-
sType <String>
The event.
-
aArgs <Object[]>
Data passed from event firer.
-
oSelf <Object>
The LogReader instance.
- Returns:
void
private
void
_printBuffer
(
)
Sends buffer of log messages to output and clears buffer.
private
void
_printToConsole
(
aEntries
)
Cycles through an array of log messages, and outputs each one to the console
if its category has not been filtered out.
- Parameters:
-
aEntries <Object[]>
Array of LogMsg objects to output to console.
- Returns:
void
void
clearConsole
(
)
Does not delete any log messages, but clears all printed log messages from
the console. Log messages will be printed out again if user re-filters. The
static method YAHOO.widget.Logger.reset() should be called in order to
actually delete log messages.
void
collapse
(
)
Collapses UI of LogReader. Logging functionality is not disrupted.
void
expand
(
)
Expands UI of LogReader. Logging functionality is not disrupted.
String
formatMsg
(
oLogMsg
)
Formats message string to HTML for output to console.
- Parameters:
-
oLogMsg <Object>
Log message object.
- Returns:
String
- HTML-formatted message for output to console.
String[]
getCategories
(
)
Returns array of enabled categories.
- Returns:
String[]
- Array of enabled categories.
Array
getCheckbox
(
Category
)
Returns related checkbox element for given filter (i.e., category or source).
- Parameters:
-
Category <String>
or source name.
- Returns:
Array
- Array of all filter checkboxes.
Date
getLastTime
(
)
Gets timestamp of the last log.
- Returns:
Date
- Timestamp of the last log.
Array
getSources
(
)
Returns array of enabled sources.
- Returns:
Array
- Array of enabled sources.
void
hide
(
)
Hides UI of LogReader. Logging functionality is not disrupted.
void
hideCategory
(
Category
)
Hides log messages associated with given category.
- Parameters:
-
Category <String>
name.
- Returns:
void
void
hideSource
(
Source
)
Hides log messages associated with given source.
- Parameters:
-
Source <String>
name.
- Returns:
void
private
void
html2Text
(
sHtml
)
Converts input chars "<", ">", and "&" to HTML entities.
- Parameters:
-
sHtml <String>
String to convert.
- Returns:
void
void
pause
(
)
Pauses output of log messages. While paused, log messages are not lost, but
get saved to a buffer and then output upon resume of LogReader.
void
resume
(
)
Resumes output of log messages, including outputting any log messages that
have been saved to buffer while paused.
void
setTitle
(
sTitle
)
Updates title to given string.
- Parameters:
-
sTitle <String>
New title.
- Returns:
void
void
show
(
)
Shows UI of LogReader. Logging functionality is not disrupted.
void
showCategory
(
Category
)
Shows log messages associated with given category.
- Parameters:
-
Category <String>
name.
- Returns:
void
void
showSource
(
Source
)
Shows log messages associated with given source.
- Parameters:
-
Source <String>
name.
- Returns:
void
String
toString
(
)
Public accessor to the unique name of the LogReader instance.
- Returns:
String
- Unique name of the LogReader instance.