Print Friendly

# Class YAHOO.widget.LogReader

Package: | YAHOO.widget
Class: | LogReader
Extends: | Object
Defined In: | logger.js

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

## Public Properties

Property | Defined By
--- | ---
| bottom : String | LogReader
Public member to access CSS bottom position of the log reader container.
| fontSize : String | LogReader
Public member to access CSS font size of the log reader container.
| footerEnabled : Boolean | LogReader
Whether or not the footer UI is enabled for the log reader.
| height : String | LogReader
Public member to access CSS height of the log reader container.
| left : String | LogReader
Public member to access CSS left position of the log reader container.
| logReaderEnabled : Boolean | LogReader
Whether or not the log reader is enabled to output log messages.
| newestOnTop : Boolean | LogReader
Whether or not newest message is printed on top.
| right : String | LogReader
Public member to access CSS right position of the log reader container.
| thresholdMax : Number | LogReader
Maximum number of messages a LogReader console will display.
| thresholdMin : Number | LogReader
When a LogReader console reaches its thresholdMax, it will clear out messages and print out the latest thresholdMin n...
| top : String | LogReader
Public member to access CSS top position of the log reader container.
| verboseOutput : Boolean | LogReader
Whether or not output is verbose (more readable). Setting to true will make output more compact (less readable).
| width : String | LogReader
Public member to access CSS width of the log reader container.

## Public Methods

Method | Defined By
--- | ---
| LogReader([`elContainer {HTMLElement}`], [`elContainer {String}`], [`oConfigs {Object}`]) | LogReader
| formatMsg(`oLogMsg {Object}`) : String | LogReader
Formats message string to HTML for output to console.
| getLastTime() : Date | LogReader
Gets timestamp of the last log.
| hide() : void | LogReader
Hides UI of log reader. Logging functionality is not disrupted.
| pause() : void | LogReader
Pauses output of log messages. While paused, log messages are not lost, but get saved to a buffer and then output upo...
| resume() : void | LogReader
Resumes output of log messages, including outputting any log messages that have been saved to buffer while paused.
| setTitle(`sTitle {String}`) : void | LogReader
Updates title to given string.
| show() : void | LogReader
Shows UI of log reader. Logging functionality is not disrupted.
| toString() : String | LogReader
Public accessor to the unique name of the LogReader instance.

## Public Events

This class has no public events.

## Property Details

### bottom

`public String bottom`
Public member to access CSS bottom position of the log reader container.
This property is defined by LogReader.

### fontSize

`public String fontSize`
Public member to access CSS font size of the log reader container.
This property is defined by LogReader.

### footerEnabled

`public Boolean footerEnabled`
Whether or not the footer UI is enabled for the log reader.
This property is defined by LogReader.

### height

`public String height`
Public member to access CSS height of the log reader container.
This property is defined by LogReader.

### left

`public String left`
Public member to access CSS left position of the log reader container.
This property is defined by LogReader.

### logReaderEnabled

`public Boolean logReaderEnabled`
Whether or not the log reader is enabled to output log messages.
This property is defined by LogReader.

### newestOnTop

`public Boolean newestOnTop`
Whether or not newest message is printed on top.
This property is defined by LogReader.

### right

`public String right`
Public member to access CSS right position of the log reader container.
This property is defined by LogReader.

### thresholdMax

`public Number thresholdMax`
Maximum number of messages a LogReader console will display.
This property is defined by LogReader.

### thresholdMin

`public Number thresholdMin`
When a LogReader console reaches its thresholdMax, it will clear out messages and print out the latest thresholdMin number of messages.
This property is defined by LogReader.

### top

`public String top`
Public member to access CSS top position of the log reader container.
This property is defined by LogReader.

### verboseOutput

`public Boolean verboseOutput`
Whether or not output is verbose (more readable). Setting to true will make output more compact (less readable).
This property is defined by LogReader.

### width

`public String width`
Public member to access CSS width of the log reader container.
This property is defined by LogReader.

## Constructor Details

### LogReader

`public function LogReader([`elContainer {HTMLElement}`], [`elContainer {String}`], [`oConfigs {Object}`])`
Parameters:

- `{HTMLElement}` : elContainer
  (optional) DOM element reference of an existing DIV.
- `{String}` : elContainer
  (optional) String ID of an existing DIV.
- `{Object}` : oConfigs
  (optional) Object literal of configuration params.

## Method Details

### formatMsg

`public function formatMsg(`oLogMsg {Object}`)`
Formats message string to HTML for output to console.
Parameters:

- `{Object}` : oLogMsg
  Log message object.

Returns:

- `String`
  HTML-formatted message for output to console.

This method is defined by LogReader.

### getLastTime

`public function getLastTime()`
Gets timestamp of the last log.
Parameters:

- None.

Returns:

- `Date`
  Timestamp of the last log.

This method is defined by LogReader.

### hide

`public function hide()`
Hides UI of log reader. Logging functionality is not disrupted.
Parameters:

- None.

Returns:

- `void`

This method is defined by LogReader.

### pause

`public function 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 log reader.
Parameters:

- None.

Returns:

- `void`

This method is defined by LogReader.

### resume

`public function resume()`
Resumes output of log messages, including outputting any log messages that have been saved to buffer while paused.
Parameters:

- None.

Returns:

- `void`

This method is defined by LogReader.

### setTitle

`public function setTitle(`sTitle {String}`)`
Updates title to given string.
Parameters:

- `{String}` : sTitle
  New title.

Returns:

- `void`

This method is defined by LogReader.

### show

`public function show()`
Shows UI of log reader. Logging functionality is not disrupted.
Parameters:

- None.

Returns:

- `void`

This method is defined by LogReader.

### toString

`public function toString()`
Public accessor to the unique name of the LogReader instance.
Parameters:

- None.

Returns:

- `String`
  Unique name of the LogReader instance.

This method is defined by LogReader.

yui-ext - Copyright © 2006 Jack Slocum. | Yahoo! UI - Copyright © 2006 Yahoo! Inc.
All rights reserved.