# Yahoo! UI Library

### Logger Widget 2.8.0r4

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.

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

Returns: `void`

#### setSource

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

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

Returns: `void`

#### toString

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

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

Copyright © 2009 Yahoo! Inc. All rights reserved.