LightningATM
LightningATM copied to clipboard
Add logging to Telegram
- Create a bot using https://t.me/botfather , enter the key in config
- Figure out your own Telegram user ID, you can ask https://t.me/lightningwatchbot for a /referral , the code is your user ID, add to config
- If app.py sees a bot key is set, it will add a handler to the existing logging module
It works well here. There are still a bit too many messages, so some are missed. We might have to lower some more message priorities to DEBUG to lower Telegram sending. Currently INFO and higher is sent.
[telegram]
# Create a bot using @botfather (/newbot). Give key below:
bot_key =
# Your own user ID to send messages to ( @lightningwatchbot
# can give you this if you type /referral )
user_id =