# Yahoo! UI Library

### Logger Widget 2.8.2r1

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.

#### 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 © 2010 Yahoo! Inc. All rights reserved.