Hide
Meet people who work on similar things as you – get help if you need it Join Siafoo Now or Learn More

Quick Python Logging Atom Feed 0

In Brief Very very basic logging... go to the Logging HOWTO for much more info http://docs.python.org/2/howto/logging.html
# 's
 1import logging
2
3# Filter out based on severity
4logging.basicConfig(level=logging.DEBUG)
5#logging.basicConfig(level=logging.WARNING)
6#logging.basicConfig(level=logging.ERROR)
7
8log = logging.getLogger(__file__ + " " + __name__)
9
10def foobar():
11
12 log.error('OMG!!!')
13 log.warn('Meh...')
14 log.debug('Zzzz...')
15
16foobar()

Very very basic logging... go to the Logging HOWTO for much more info http://docs.python.org/2/howto/logging.html