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.ext import Updater, CommandHandler, MessageHandler, Filters
|
||||||
from telegram import ParseMode
|
from telegram import ParseMode
|
||||||
from block_io import BlockIo, BlockIoAPIError
|
from block_io import BlockIo, BlockIoAPIError
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
BLOCK_IO_API_KEY = os.environ['BLOCK_IO_API_KEY']
|
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']
|
TELEGRAM_API_KEY = os.environ['TELEGRAM_API_KEY']
|
||||||
NETWORK = os.environ['NETWORK']
|
NETWORK = os.environ['NETWORK']
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
|
||||||
|
logging.basicConfig(level=logging.DEBUG,
|
||||||
|
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||||
|
|
||||||
# Exceptions
|
# Exceptions
|
||||||
|
|
||||||
class NoAccountError(Exception):
|
class NoAccountError(Exception):
|
||||||
|
Loading…
Reference in New Issue
Block a user