Debug option added to env
This commit is contained in:
parent
0c8b70655e
commit
2c3164ddeb
5
bot.py
5
bot.py
@ -44,7 +44,10 @@ 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")
|
||||||
|
|
||||||
logging.getLogger('aiogram').setLevel(logging.DEBUG)
|
if os.getenv('DEBUG') == "yes":
|
||||||
|
logging.getLogger('aiogram').setLevel(logging.DEBUG)
|
||||||
|
else:
|
||||||
|
logging.getLogger('aiogram').setLevel(logging.DEBUG)
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -8,4 +8,5 @@ OK_GROUP_ID = 'OK_GROUP_ID_HERE'
|
|||||||
SD_HOST = '127.0.0.1'
|
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