Chapter 14.6.1. Using Logging

The simplest way to use logging is with the log(msg[, obj, ...]). If you call log(“Hi there!”), a logging message will appear.

You might be wondering where it will appear, particularly if you try that in the interactive interpreter and don’t see any output. By default, it will appear in your browser’s native console. Safari and Opera 9 both have the notion of a console they can print to. Firefox with the FireBug extension does, too. With Internet Explorer, MochiKit.Logging will interact with the Microsoft Script Debugger and the Atlas framework.

There is also a cross-browser way to view the logging output. You can add a bookmarklet that points to javascript:MochiKit.Logging.logger.debuggingBookmarklet() ...

Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.