forked from soaska/sd_telegram
Merge pull request #1 from soaska/pull-request1
Debug option added to env
This commit is contained in:
commit
592e58766b
3
bot.py
3
bot.py
@ -44,6 +44,9 @@ dotenv.load_dotenv()
|
|||||||
logging.basicConfig(format="[%(asctime)s] %(levelname)s : %(name)s : %(message)s",
|
logging.basicConfig(format="[%(asctime)s] %(levelname)s : %(name)s : %(message)s",
|
||||||
level=logging.DEBUG, datefmt="%d-%m-%y %H:%M:%S")
|
level=logging.DEBUG, datefmt="%d-%m-%y %H:%M:%S")
|
||||||
|
|
||||||
|
if os.getenv('DEBUG') == "yes":
|
||||||
|
logging.getLogger('aiogram').setLevel(logging.DEBUG)
|
||||||
|
else:
|
||||||
logging.getLogger('aiogram').setLevel(logging.DEBUG)
|
logging.getLogger('aiogram').setLevel(logging.DEBUG)
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -9,3 +9,4 @@ SD_HOST = '127.0.0.1'
|
|||||||
SD_PORT = '7861'
|
SD_PORT = '7861'
|
||||||
SD_USERNAME = 'user'
|
SD_USERNAME = 'user'
|
||||||
SD_PASSWORD = '1234'
|
SD_PASSWORD = '1234'
|
||||||
|
DEBUG = 'no' # 'yes' to debug
|
Loading…
Reference in New Issue
Block a user