use logging

This commit is contained in:
Jannes Höke 2015-11-22 19:20:16 +01:00
parent 83812f3af6
commit 8d267ed896

View file

@ -28,6 +28,7 @@ formatter = \
ch.setFormatter(formatter)
root.addHandler(ch)
logger = logging.getLogger(__name__)
# Command Handlers
def start(bot, update):
@ -43,7 +44,7 @@ def echo(bot, update):
def error(bot, update, error):
print('Update "%s" caused error "%s"' % (update, error))
logger.warn('Update "%s" caused error "%s"' % (update, error))
def main():