LightningATM icon indicating copy to clipboard operation
LightningATM copied to clipboard

Add logging to Telegram

Open AbelLykens opened this issue 4 years ago • 0 comments

  1. Create a bot using https://t.me/botfather , enter the key in config
  2. 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
  3. 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 = 

AbelLykens avatar Oct 02 '20 19:10 AbelLykens