mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 22:56:38 +01:00
use logging
This commit is contained in:
parent
83812f3af6
commit
8d267ed896
1 changed files with 2 additions and 1 deletions
|
@ -28,6 +28,7 @@ formatter = \
|
||||||
ch.setFormatter(formatter)
|
ch.setFormatter(formatter)
|
||||||
root.addHandler(ch)
|
root.addHandler(ch)
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
# Command Handlers
|
# Command Handlers
|
||||||
def start(bot, update):
|
def start(bot, update):
|
||||||
|
@ -43,7 +44,7 @@ def echo(bot, update):
|
||||||
|
|
||||||
|
|
||||||
def error(bot, update, error):
|
def error(bot, update, error):
|
||||||
print('Update "%s" caused error "%s"' % (update, error))
|
logger.warn('Update "%s" caused error "%s"' % (update, error))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Reference in a new issue