make logging not shit

This commit is contained in:
Nexus 2024-02-22 15:13:57 +00:00
parent eb8eda9e48
commit 665c4b82a5
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -40,9 +40,8 @@ async def startup(_):
logging.basicConfig( logging.basicConfig(
level=logging.getLevelName(os.environ.get("LOG_LEVEL", "INFO").upper()), level=logging.getLevelName(os.environ.get("LOG_LEVEL", "INFO").upper()),
format="%(message)s", format="%(asctime):%(levelname):%(name):%(message)s",
datefmt="[%X]", datefmt="%d/%m/%Y %H:%M:%S"
handlers=[RichHandler(markup=True)]
) )
app = fastapi.FastAPI( app = fastapi.FastAPI(
root_path=os.environ.get("PREVIEW_ROOT_PATH", ""), root_path=os.environ.get("PREVIEW_ROOT_PATH", ""),