Uvicorn INFO logs are treated as errors
elupanov
PROOP

2 years ago

I have a Uvicorn server running the FastAPI framework. Uvicorn writes logs at the INFO level, but these are treated as error level in the deployment logs.

Example of logs:

INFO: Will watch for changes in these directories: ['/app']

INFO: Uvicorn running on http://[::]:8000 (Press CTRL+C to quit)

INFO: Started reloader process [1] using StatReload

INFO: Started server process [3]

INFO: Waiting for application startup.

INFO: Application startup complete.

Solved

3 Replies

2 years ago

Hello,

They are treated as error because they are logged to stderr.

We do not take into account the INFO portion of the log message as there is no true standard for that.

For best support you would use JSON logging and then we will respect the level attribute regardless of if the log was sent to stderr or stdout.

Best,

Brody


Status changed to Awaiting User Response Railway • over 1 year ago


elupanov
PROOP

2 years ago

Thanks for the explanation and a quick response!


Status changed to Awaiting Railway Response Railway • over 1 year ago


2 years ago

No problem!


Status changed to Awaiting User Response Railway • over 1 year ago


Status changed to Solved brody • over 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...