Skip to content

Commit

Permalink
nice one
Browse files Browse the repository at this point in the history
  • Loading branch information
AshokShau authored Feb 10, 2024
1 parent 447db44 commit 1b1f788
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions Assistant/__init__.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
import logging
from time import time
import config

from config import DEBUG, SUDO_USER
from time import time

if DEBUG:
logging.basicConfig(
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
handlers=[logging.FileHandler("log.txt"), logging.StreamHandler()],
level=logging.DEBUG,
)
else:
logging.basicConfig(
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
handlers=[logging.FileHandler("log.txt"), logging.StreamHandler()],
level=logging.INFO,
)
logging.getLogger("apscheduler").setLevel(logging.WARNING)
logging.getLogger("httpx").setLevel(logging.ERROR)

logging.basicConfig(
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
handlers=[logging.FileHandler("log.txt"), logging.StreamHandler()],
level=config.LOGGER_LEVEL,
)
logging.getLogger("apscheduler").setLevel(logging.WARNING)
logging.getLogger("httpx").setLevel(logging.ERROR)

LOGGER = logging.getLogger(__name__)


StartTime = time()

SUDO_USERS = SUDO_USER
SUDO_USERS = config.SUDO_USER

0 comments on commit 1b1f788

Please sign in to comment.