Skip to content

Commit 2b29abc

Browse files
committed
Fix logging in dev
1 parent 43e4500 commit 2b29abc

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
run:
2-
source ./venv/bin/activate && uvicorn --reload --log-config logging_test.conf social.routes.base:app
2+
source ./venv/bin/activate && uvicorn --reload --log-config logging_dev.conf social.routes.base:app
33

44
format: configure
55
source ./venv/bin/activate && autoflake -r --in-place --remove-all-unused-imports ./social

logging_dev.conf

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[loggers]
2+
keys=root
3+
4+
[handlers]
5+
keys=all
6+
7+
[formatters]
8+
keys=main
9+
10+
[logger_root]
11+
level=DEBUG
12+
handlers=all
13+
14+
[handler_all]
15+
class=StreamHandler
16+
formatter=main
17+
level=DEBUG
18+
args=(sys.stdout,)
19+
20+
[formatter_main]
21+
format=%(asctime)s %(levelname)-8s %(name)-15s %(message)s

0 commit comments

Comments
 (0)