logging.basicConfig(...) is executed at module import time, which can override/lock in logging configuration for any process that imports api.server (including tests and ASGI servers). Consider moving logging configuration to the executable entrypoint (e.g., main.py) or only configuring if no handlers are present, to avoid side effects for library consumers.
if not logging.getLogger().hasHandlers():
logging.basicConfig(level=os.getenv("LOGLEVEL", logging.INFO))
Originally posted by @Copilot in #253
Originally posted by @Copilot in #253