API: logger LogWriter (YUI Library)

# Yahoo! UI Library

### Logger Widget 2.9.0

Yahoo! UI Library > logger > LogWriter
Search:
Filters Show Private Show Protected Show Deprecated

## Class LogWriter

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

### Constructor

LogWriter `( sSource )`

Parameters:
  `sSource <String>` Source of LogWriter instance.

### Properties

#### _source - `private String`

Source of the LogWriter instance.

### Methods

#### getSource

`String getSource ( )`
Public accessor to get the source name.

Returns: `String`
  The LogWriter source.

#### log

`void log ( sMsg , sCategory )`
Logs a message attached to the source of the LogWriter. Note: the LogReader adds the message and category to the DOM as HTML.

Parameters:
  `sMsg <HTML>` The log message.
  `sCategory <HTML>` Category name.

#### setSource

`void setSource ( sSource )`
Public accessor to set the source name.

Parameters:
  `sSource <String>` Source of LogWriter instance.

#### toString

`String toString ( )`
Public accessor to the unique name of the LogWriter instance.

Returns: `String`
  Unique name of the LogWriter instance.

Copyright © 2011 Yahoo! Inc. All rights reserved.