Added shortcuts functions in the `log' module

This commit is contained in:
Skami18 2011-04-19 11:49:24 +02:00
commit 834c952f20

View file

@ -66,6 +66,14 @@ class Formatter(object):
# shortcuts
debug, info, warn, error, critical = (logging.debug,
logging.info,
logging.warn,
logging.error,
logging.critical)
def init(logger=logging.getLogger(), handler=logging.StreamHandler()):
fmt = Formatter()
handler.setFormatter(fmt)