YUI Library Home

Site Search (YDN & YUIBlog):

# YUI Library Examples: Logger Control: Logger Integration with YUI Components

# Logger Control: Logger Integration with YUI Components

Logger can be used with YUI components to read debugging messages.

View example in new window.

## Sample Code

CSS:

/* custom styles for this example */ #statesautocomplete {width:20em;}

Markup:

<div id="statesautocomplete"> <input id="statesinput"> <div id="statescontainer"></div> </div>

JavaScript:

<script type="text/javascript" src="./logger.js"></script> <script type="text/javascript" src="./autocomplete-debug.js"></script> <script type="text/javascript" YAHOO.example.LogAutoComplete = new function() { // Instantiate LogReader this.oLogReader = new YAHOO.widget.LogReader(); // Instantiate DataSource this.oACDS = new YAHOO.util.FunctionDataSource(getStates); // Instantiate AutoComplete this.oAutoComp = new YAHOO.widget.AutoComplete('statesinput','statescontainer', this.oACDS); }; </script>

### Logger Control Examples:

- Basic Logging
- Configuring LogReader
- Using LogWriter
- Logger Integration with YUI Components
- Skinning Model
- Complex Application (included with examples for Layout Manager)

### More Logger Control Resources:

- User's Guide (external)
- API Documentation
- Cheat Sheet PDF (external)

Copyright © 2008 Yahoo! Inc. All rights reserved.

Privacy Policy - Terms of Service - Copyright Policy - Job Openings