Created
May 16, 2010 03:00
-
-
Save erikeldridge/402604 to your computer and use it in GitHub Desktop.
A convenience fn for adding meta data to the log in YQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A convenience fn for adding meta data to the log in YQL | |
* | |
* Usage: | |
* 1) copy/paste this code into your YQL table's execute block | |
* 2) Edit the tableName var to match your table's name | |
* 3) To log the message 'aloha' on line 25, call the logger like this: logger( 'aloha', 25 ); | |
* 4) Look in the diagnostics section of your YQL output to see the log entry | |
* | |
* License: Yahoo! BSD http://gist.github.com/375593 | |
* Source: http://gist.github.com/402604 | |
**/ | |
function logger( message, lineNumber ){ | |
// edit this to match your file's name | |
var tableName = 'table.xml'; | |
y.log( 'table: ' + tableName + ', line: ' + lineNumber + ', message: ' + message ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment