Changes
Development Team/Almanac/Python Standard Logging (view source)
Revision as of 10:49, 9 July 2008
, 10:49, 9 July 2008no edit summary
=== What is the overall structure of python standard logging that I will use in Sugar? ===
Sugar uses Python's <ref>[http://www.onlamp.com/pub/a/python/2005/06/02/logging.html Standard Logging]</ref> pretty much without modification.
=== How do I write to a log in my activity code? ===
=== How do I write to a log in my activity code? ===
Sugar uses [http://www.onlamp.com/pub/a/python/2005/06/02/logging.html python's standard logging]. The following code shows how to output something at the debug log level. The log message will be written to the standard log output destination (usually the console).
Sugar uses [http://www.onlamp.com/pub/a/python/2005/06/02/logging.html python's standard logging]. The following code shows how to output something at the debug log level. The log message will be written to the standard log output destination (usually the console).
...
...
_logger.debug('starting activity')
_logger.debug('starting activity')
= Notes =
<references />