Skip to content

Commit d63dfae

Browse files
author
Jakub Miazek
committed
replace uvicorn logger config with json
1 parent 6f0b097 commit d63dfae

File tree

3 files changed

+21
-50
lines changed

3 files changed

+21
-50
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN apt-get purge -y curl git build-essential \
2727
&& rm -rf /var/apt/lists/* \
2828
&& rm -rf /var/cache/apt/*
2929

30-
FROM install as app-image
30+
FROM install AS app-image
3131

3232
ENV PYTHONPATH=/home/code/ PYTHONHASHSEED=0
3333

config.ini

Lines changed: 0 additions & 48 deletions
This file was deleted.

uvicorn-logging.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,35 @@
2929
"formatter": "default",
3030
"width": 140,
3131
"style": "magenta"
32+
},
33+
"stream": {
34+
"class": "app.utils.logging.RichConsoleHandler",
35+
"omit_repeated_times": true,
36+
"show_time": false,
37+
"enable_link_path": false,
38+
"tracebacks_show_locals": true,
39+
"rich_tracebacks": true,
40+
"formatter": "default",
41+
"width": 140,
42+
"style": "white"
3243
}
3344
},
3445
"loggers": {
3546
"root": {
3647
"handlers": [
37-
"uvicorn"
48+
"stream"
3849
],
3950
"propagate": false,
4051
"level": "TRACE"
4152
},
53+
"uvicorn.access": {
54+
"handlers": [
55+
"uvicorn"
56+
],
57+
"propagate": false,
58+
"level": "TRACE",
59+
"qualname": "uvicorn.access"
60+
},
4261
"sqlalchemy.engine.Engine": {
4362
"handlers": [
4463
"sqlalchemy"

0 commit comments

Comments
 (0)