Development Team/Almanac/Python Standard Logging: Difference between revisions
m 15 revisions |
_logger.setLevel(logging.DEBUG) |
||
| (7 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
{{ | {{Almanac}} | ||
=== What is the overall structure of python standard logging that I will use in Sugar? === | === What is the overall structure of python standard logging that I will use in Sugar? === | ||
| Line 12: | Line 12: | ||
import logging | import logging | ||
_logger = logging.getLogger('annotate-activity') | _logger = logging.getLogger('annotate-activity') | ||
_logger.setLevel(logging.DEBUG) | |||
... | ... | ||
_logger.debug('starting activity') | _logger.debug('starting activity') | ||
| Line 24: | Line 26: | ||
import logging.config | import logging.config | ||
_logger = logging.getLogger('activity-annotate') | _logger = logging.getLogger('activity-annotate') | ||
_logger.setLevel(logging.DEBUG) | |||
... | ... | ||
#### Method: __init__, initialize this AnnotateActivity instance | #### Method: __init__, initialize this AnnotateActivity instance | ||