fix(fastapi): centralize logging initialization

With this change, we provide a wrapper to `logging.getLogger`
in the `aurweb.logging` module. Modules wishing to log using
logging.conf should get their module-local loggers by calling
`aurweb.logging.getLogger(__name__)`, similar to `logging.getLogger`,
this way initialization with logging.conf is guaranteed.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-10-21 10:08:45 -07:00
parent 5ae9d09e98
commit a06f4ec19c
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
10 changed files with 46 additions and 23 deletions

View file

@ -15,13 +15,13 @@ handlers=simpleHandler
level=DEBUG
handlers=detailedHandler
qualname=aurweb
propagate=0
propagate=1
[logger_test]
level=DEBUG
handlers=detailedHandler
qualname=test
propagate=0
propagate=1
[logger_uvicorn]
level=DEBUG