Created
October 11, 2013 17:53
-
-
Save jleyba/6939136 to your computer and use it in GitHub Desktop.
Add logging using Closure. Logged messages will be printed to the DOM.
This file contains hidden or 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
| goog.require('goog.debug.DivConsole'); | |
| goog.require('goog.debug.LogManager'); | |
| goog.require('goog.log'); | |
| var div = document.createElement('div'); | |
| document.body.appendChild(div); | |
| var divConsole = new goog.debug.DivConsole(div); | |
| divConsole.setCapturing(true); | |
| var log = goog.log.getLogger('my.logger'); | |
| goog.log.info(log, 'Hello, world!'); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment