Logging erreurs
This commit is contained in:
parent
26996c04d2
commit
5fef0bddb6
6
run.py
6
run.py
@ -1,6 +1,7 @@
|
||||
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
|
||||
from telegram import ParseMode
|
||||
from block_io import BlockIo, BlockIoAPIError
|
||||
import logging
|
||||
import os
|
||||
|
||||
BLOCK_IO_API_KEY = os.environ['BLOCK_IO_API_KEY']
|
||||
@ -8,6 +9,11 @@ BLOCK_IO_PIN = os.environ['BLOCK_IO_PIN']
|
||||
TELEGRAM_API_KEY = os.environ['TELEGRAM_API_KEY']
|
||||
NETWORK = os.environ['NETWORK']
|
||||
|
||||
# Logging
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG,
|
||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
|
||||
# Exceptions
|
||||
|
||||
class NoAccountError(Exception):
|
||||
|
Loading…
Reference in New Issue
Block a user