Is there an existing issue for this?
What happened?
When starting the backend and sync-microservices services using fastapi dev commands, the startup logs from Uvicorn (e.g., "Started server process") are prefixed with [error]. This is misleading as these are standard informational logs, not errors.
Steps to Reproduce
- Start the backend service:
fastapi dev --port 52123.
- Observe the console output during startup.
- Start the sync-microservices service:
fastapi dev --port 52124.
- Observe the console output during startup.
Expected Behavior
The logs should be labeled with [uvicorn] or a similar neutral tag, indicating the source of the log without implying an error severity.
Example:
[BACKEND] | [uvicorn] | INFO | Started server process [12345]
This issue appears to be a regression introduced in PR #940. Previously, the InterceptHandler explicitly prepended [uvicorn] to the log messages:
logger.log(record.levelno, f"[uvicorn] {msg}")
The refactoring to avoid recursion changed this logic to derive the tag from the logger name (uvicorn.error -> error), causing the misleading [error] tag.
Record
Is there an existing issue for this?
What happened?
When starting the
backendandsync-microservicesservices usingfastapi devcommands, the startup logs from Uvicorn (e.g., "Started server process") are prefixed with[error]. This is misleading as these are standard informational logs, not errors.Steps to Reproduce
fastapi dev --port 52123.fastapi dev --port 52124.Expected Behavior
The logs should be labeled with
[uvicorn]or a similar neutral tag, indicating the source of the log without implying an error severity.Example:
This issue appears to be a regression introduced in PR #940. Previously, the
InterceptHandlerexplicitly prepended[uvicorn]to the log messages:The refactoring to avoid recursion changed this logic to derive the tag from the logger name (
uvicorn.error->error), causing the misleading[error]tag.Record