make logging not shit
This commit is contained in:
parent
eb8eda9e48
commit
665c4b82a5
1 changed files with 2 additions and 3 deletions
|
@ -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", ""),
|
||||||
|
|
Loading…
Reference in a new issue