Yahoo! UI Library

Logger Widget  2.6.0

Yahoo! UI Library > logger > YAHOO.widget.LogReader

Class YAHOO.widget.LogReader

The LogReader class provides UI to read messages logged to YAHOO.widget.Logger.

Constructor

YAHOO.widget.LogReader ( elContainer , oConfigs )
Parameters:
elContainer <HTMLElement> (optional) DOM element reference of an existing DIV.
elContainer <String> (optional) String ID of an existing DIV.
oConfigs <Object> (optional) Object literal of configuration params.

Properties

BASIC_TEMPLATE - static object

Template used for innerHTML of compact entry output.
Default Value: "

{label}{totalTime}ms (+{elapsedTime}) {localTime}: {sourceAndDetail}: {message}

"

bottom - String

Public member to access CSS bottom position of the LogReader container.

draggable - Boolean

Enables draggable LogReader if DragDrop Utility is present.
Default Value: true

ENTRY_TEMPLATE - static {HTMLElement}

Node template for the log entries
Default Value: PRE.yui-log-entry element

entryFormat - String

Custom output format for log messages. Defaults to null, which falls back to verboseOutput param deciding between LogReader.VERBOSE_TEMPLATE and LogReader.BASIC_TEMPLATE. Use bracketed place holders to mark where message info should go. Available place holder names include:
  • category
  • label
  • sourceAndDetail
  • message
  • localTime
  • elapsedTime
  • totalTime
Default Value: null

fontSize - String

Public member to access CSS font size of the LogReader container.

footerEnabled - Boolean

Whether or not the footer UI is enabled for the LogReader.
Default Value: true

height - String

Public member to access CSS height of the LogReader container.

isCollapsed - Boolean

True when LogReader is in a collapsed state, false otherwise.
Default Value: false

isPaused - Boolean

True when LogReader is in a paused state, false otherwise.
Default Value: false

left - String

Public member to access CSS left position of the LogReader container.

logReaderEnabled - Boolean

Whether or not LogReader is enabled to output log messages.
Default Value: true

newestOnTop - Boolean

Whether or not newest message is printed on top.

outputBuffer - Number

Output timeout buffer in milliseconds.
Default Value: 100

right - String

Public member to access CSS right position of the LogReader container.

thresholdMax - Number

Maximum number of messages a LogReader console will display.
Default Value: 500

thresholdMin - Number

When a LogReader console reaches its thresholdMax, it will clear out messages and print out the latest thresholdMin number of messages.
Default Value: 100

top - String

Public member to access CSS top position of the LogReader container.

VERBOSE_TEMPLATE - static object

Template used for innerHTML of verbose entry output.
Default Value: "{label}{totalTime}ms (+{elapsedTime}) {localTime}:

{sourceAndDetail}

{message}

"

verboseOutput - Boolean

Whether or not output is verbose (more readable). Setting to true will make output more compact (less readable).
Default Value: true

width - String

Public member to access CSS width of the LogReader container.

Methods

clearConsole

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.
Returns: void

collapse

void collapse ( )
Collapses UI of LogReader. Logging functionality is not disrupted.
Returns: void

expand

void expand ( )
Expands UI of LogReader. Logging functionality is not disrupted.
Returns: void

getCategories

String[] getCategories ( )
Returns array of enabled categories.
Returns: String[]
Array of enabled categories.

getCheckbox

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.

getLastTime

Date getLastTime ( )
Gets timestamp of the last log.
Returns: Date
Timestamp of the last log.

getSources

Array getSources ( )
Returns array of enabled sources.
Returns: Array
Array of enabled sources.

hide

void hide ( )
Hides UI of LogReader. Logging functionality is not disrupted.
Returns: void

hideCategory

void hideCategory ( Category )
Hides log messages associated with given category.
Parameters:
Category <String> name.
Returns: void

hideSource

void hideSource ( Source )
Hides log messages associated with given source.
Parameters:
Source <String> name.
Returns: void

pause

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.
Returns: void

resume

void resume ( )
Resumes output of log messages, including outputting any log messages that have been saved to buffer while paused.
Returns: void

setTitle

void setTitle ( sTitle )
Updates title to given string.
Parameters:
sTitle <String> New title.
Returns: void

show

void show ( )
Shows UI of LogReader. Logging functionality is not disrupted.
Returns: void

showCategory

void showCategory ( Category )
Shows log messages associated with given category.
Parameters:
Category <String> name.
Returns: void

showSource

void showSource ( Source )
Shows log messages associated with given source.
Parameters:
Source <String> name.
Returns: void

toString

String toString ( )
Public accessor to the unique name of the LogReader instance.
Returns: String
Unique name of the LogReader instance.


Copyright © 2008 Yahoo! Inc. All rights reserved.