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():