Say Goodbye to alert()
Written by on October 15th, 2008 in Uncategorized.
Blackbird, G. Scott Olson’s JavaScript logging library, truly has a catchy slogan. The slogan “Say hello to Blackbird and ‘goodbye’ to alert()” definitely captures what the Blackbird library aims to do; make logging messages in JavaScript extremely easy. And setup is very easy. By incorporating the following lines of code, you’ve now added the ability to set checkpoints which will display specific data you’re interested in:
From there, its a simple matter of using Blackbird’s methods to send results to the console:
-
-
log.debug( ‘this is a debug message’ );
-
log.info( ‘this is an info message’ );
-
log.warn( ‘this is a warning message’ );
-
log.error( ‘this is an error message’ );
-
The nice thing is that each of these public methods uniquely displays the data to make it easy to determine the type of message being sent:
Blackbird has been tested in:
- Internet Explorer 6+
- Firefox 2+
- Safari 2+
- Opera 9.5
Brian Dillard was one of the first to announce this release and has also done a nice writeup of Blackbird.
Source: Ajaxian » Front Page
Original Article: http://feeds.feedburner.com/~r/ajaxian/~3/421882175/say-goodbye-to-alert
