diff --git a/bot.py b/bot.py index 94af007..eeeff65 100644 --- a/bot.py +++ b/bot.py @@ -44,7 +44,10 @@ dotenv.load_dotenv() logging.basicConfig(format="[%(asctime)s] %(levelname)s : %(name)s : %(message)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__) diff --git a/example.env b/example.env index 7106295..90ae34f 100644 --- a/example.env +++ b/example.env @@ -8,4 +8,5 @@ OK_GROUP_ID = 'OK_GROUP_ID_HERE' SD_HOST = '127.0.0.1' SD_PORT = '7861' SD_USERNAME = 'user' -SD_PASSWORD = '1234' \ No newline at end of file +SD_PASSWORD = '1234' +DEBUG = 'no' # 'yes' to debug \ No newline at end of file