Yahoo! Developer Network Home - Help

YDN Site Search

# 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.widget.DS_JSFunction(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

### More Logger Control Resources:

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

Copyright © 2007 Yahoo! Inc. All rights reserved.

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