Commit graph

7 commits

Author SHA1 Message Date
Kevin Morris
409229739e
feat(conftest): set default logging.conf to DEBUG
We now maintain a logging.prod.conf, which should contain sane
defaults for a production instance. Our main logging.conf is
a good default for both testing and debugging, but provides
too much logging for production.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-07 15:09:13 -08:00
Kevin Morris
de7e3ab607
fix(logging): restore aurweb logger; null out root logger
After actually digging into how the logger does things,
since the root logger is required and we have specific
level-changing loggers for our components, we must no-op
the root logger to avoid it duplicating logs from the others.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-07 07:45:59 -08:00
Kevin Morris
4426c639ce
fix(logging): remove test logger definition
Like the `aurweb` logger definiton was previously, the `test`
logger is being redundant with the root logger. Use root for
all aurweb-local logging.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-28 19:55:12 -08:00
Kevin Morris
3b686c475d
fix: default detailed loglevel to DEBUG
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-22 10:22:58 -08:00
Kevin Morris
e8f4c9cf69
fix(fastapi): remove aurweb logger definition
Both the root and aurweb loggers are included in output,
causing repeated log messages. Now, just rely on the
root logger for aurweb logging.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-21 00:54:23 -08:00
Kevin Morris
a06f4ec19c
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>
2021-10-21 10:40:52 -07:00
Kevin Morris
55c0637b98 add logging.config.fileConfig
This resolves logging issues with alembic on aurweb.initdb
in addition to adding more logging utilities for aurweb
and tests in general.

Developers should fetch a logger for their specific module
via `logging.getLogger(__name__)`.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-06-24 18:56:38 -07:00