Print Friendly

# Class YAHOO.widget.LogWriter

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

The LogWriter class provides a mechanism to log messages through YAHOO.widget.Logger from a named source.

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| LogWriter(`sSource {String}`) | LogWriter
| getSource() : String | LogWriter
Public accessor to get the source name.
| log(`sMsg {String}`, `sCategory {String}`) : void | LogWriter
Logs a message attached to the source of the LogWriter.
| setSource(`sSource {String}`) : void | LogWriter
Public accessor to set the source name.
| toString() : String | LogWriter
Public accessor to the unique name of the LogWriter instance.

## Public Events

This class has no public events.

## Constructor Details

### LogWriter

`public function LogWriter(`sSource {String}`)`
Parameters:

- `{String}` : sSource
  Source of LogWriter instance.

## Method Details

### getSource

`public function getSource()`
Public accessor to get the source name.
Parameters:

- None.

Returns:

- `String`
  The LogWriter source.

This method is defined by LogWriter.

### log

`public function log(`sMsg {String}`, `sCategory {String}`)`
Logs a message attached to the source of the LogWriter.
Parameters:

- `{String}` : sMsg
  The log message.
- `{String}` : sCategory
  Category name.

Returns:

- `void`

This method is defined by LogWriter.

### setSource

`public function setSource(`sSource {String}`)`
Public accessor to set the source name.
Parameters:

- `{String}` : sSource
  Source of LogWriter instance.

Returns:

- `void`

This method is defined by LogWriter.

### toString

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

- None.

Returns:

- `String`
  Unique name of the LogWriter instance.

This method is defined by LogWriter.

Copyright © 2006 Jack Slocum. All rights reserved.