From 8d267ed8968a58ba5cf9371306271cb3a25f1c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Sun, 22 Nov 2015 19:20:16 +0100 Subject: [PATCH] use logging --- examples/eventhandler_simplebot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/eventhandler_simplebot.py b/examples/eventhandler_simplebot.py index fb34119b2..27cd70152 100644 --- a/examples/eventhandler_simplebot.py +++ b/examples/eventhandler_simplebot.py @@ -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():