Skip to content

Commit

Permalink
Set log level more directly
Browse files Browse the repository at this point in the history
  • Loading branch information
s2t2 committed Oct 14, 2024
1 parent 4f3860a commit 236a8ff
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions truthbrush/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@

load_dotenv() # take environment variables from .env.

logging.basicConfig(
level=(
logging.DEBUG
if os.getenv("DEBUG") and os.getenv("DEBUG").lower() != "false"
else logging.INFO
)
)
# LOG_LEVEL: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET
LOG_LEVEL = os.getenv("LOG_LEVEL", default="INFO").upper()
logging.basicConfig(level=eval("logging.{LOG_LEVEL}")),

BASE_URL = "https://truthsocial.com"
API_BASE_URL = "https://truthsocial.com/api"
Expand Down

0 comments on commit 236a8ff

Please sign in to comment.