Skip to content

Commit

Permalink
use logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jh0ker committed Nov 22, 2015
1 parent 83812f3 commit 8d267ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/eventhandler_simplebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
ch.setFormatter(formatter)
root.addHandler(ch)

logger = logging.getLogger(__name__)

# Command Handlers
def start(bot, update):
Expand All @@ -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():
Expand Down

0 comments on commit 8d267ed

Please sign in to comment.