Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions loggers.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
import os
from distutils.util import strtobool as sb
from logging import DEBUG, INFO, basicConfig, getLogger
from logging import requests, INFO, basicConfig, getLogger
from logging import DEBUG, WARNING, basicConfig, getLogger, INFO
from logging.handlers import RotatingFileHandler
import logging
ENV = os.environ.get("ENV", False)
if ENV:
pass
else:
pass

Comment on lines -8 to -12
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 8-12 refactored with the following changes:

ENV = os.environ.get("ENV", False)
if bool(ENV):
CONSOLE_LOGGER_VERBOSE = sb(os.environ.get("CONSOLE_LOGGER_VERBOSE", "False"))

if CONSOLE_LOGGER_VERBOSE:
basicConfig(
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
level=DEBUG,
level=debug,
)
else:
basicConfig(
Expand Down