Logs to file
#1418
-
Is there a simple way to save logs from terminal into file ? I have formatted adding timestamp on it but no idea how to save it and is it bad running uvicorn in production i read on page that i should be using gunicorn but then im not sure what to run anymore. |
Beta Was this translation helpful? Give feedback.
Answered by
euri10
Mar 24, 2022
Replies: 1 comment 4 replies
-
you probably want to use a |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
infernalx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you probably want to use a
FileHandler
(see https://docs.python.org/3/library/logging.handlers.html) in your logging config and use it with our--log-config
flag (see https://www.uvicorn.org/settings/#logging)