Skip to content

Commit e505747

Browse files
committed
chore: set loglevel for uvicorn
1 parent d49023a commit e505747

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

backend/api/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,4 +471,5 @@ async def check_redis():
471471
return False
472472

473473
if __name__ == "__main__":
474-
uvicorn.run(app, host="0.0.0.0", port=8000, reload=True)
474+
uvicorn.run(app, host="0.0.0.0", port=8000, reload=True,
475+
log_level=settings.LOG_LEVEL.lower())

settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Settings(BaseSettings):
1616
FIWARE_SERVICE: str = "gateway_test"
1717
FIWARE_SERVICEPATH: str = "/"
1818
# Get log level from environment variable, default to INFO if not set
19-
LOG_LEVEL: str = 'INFO'
19+
LOG_LEVEL: str = 'INFO' # 'critical', 'error', 'warning', 'info', 'debug'
2020

2121
class Config:
2222
env_file = ".env"

0 commit comments

Comments
 (0)