From 2dd57fd9dd30bdd752a20dacf5efeccd8488fe32 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Tue, 20 Feb 2024 09:31:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=20uvicorn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uvicorn_config.json | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 uvicorn_config.json diff --git a/uvicorn_config.json b/uvicorn_config.json new file mode 100644 index 0000000..b51ff91 --- /dev/null +++ b/uvicorn_config.json @@ -0,0 +1,45 @@ +{ + "version": 1, + "disable_existing_loggers": false, + "formatters": { + "default": { + "()": "uvicorn.logging.DefaultFormatter", + "fmt": "%(asctime)s - %(levelprefix)s %(message)s", + "use_colors": null + }, + "access": { + "()": "uvicorn.logging.AccessFormatter", + "fmt": "%(asctime)s - %(levelprefix)s %(client_addr)s - \"%(request_line)s\" %(status_code)s" + } + }, + "handlers": { + "default": { + "formatter": "default", + "class": "logging.StreamHandler", + "stream": "ext://sys.stderr" + }, + "access": { + "formatter": "access", + "class": "logging.StreamHandler", + "stream": "ext://sys.stdout" + } + }, + "loggers": { + "uvicorn": { + "handlers": [ + "default" + ], + "level": "INFO" + }, + "uvicorn.error": { + "level": "INFO" + }, + "uvicorn.access": { + "handlers": [ + "access" + ], + "level": "INFO", + "propagate": false + } + } +} \ No newline at end of file