YUI Library Home

Site Search (YDN & YUIBlog):

# YUI Library Examples: Logger Control: Basic Logging

# Logger Control: Basic Logging

A demonstration of basic logging functionality using Logger and LogReader.

View example in new window.

## Sample Code for this Example

CSS:

/* No custom CSS. */

Markup:

<p><a href="#" id="loglink">Click here</a> to log a simple message.</p>

JavaScript:

YAHOO.example.Basic = new function() { YAHOO.util.Event.addListener(YAHOO.util.Dom.get("loglink"), "click", function(e) { YAHOO.util.Event.stopEvent(e); YAHOO.log("This is a simple log message."); }); // Put a LogReader on your page this.myLogReader = new YAHOO.widget.LogReader(); };

## Configuration for This Example

You can load the necessary JavaScript and CSS for this example from Yahoo's servers. Click here to load the YUI Dependency Configurator with all of this example's dependencies preconfigured.

### Logger Control Examples:

### More Logger Control Resources:

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

Copyright © 2010 Yahoo! Inc. All rights reserved.

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