We'll override logging.conf with logging.test.conf for debug logging
needed for tests now, so we can rely on the default logging.conf
for production use.
Signed-off-by: Kevin Morris <kevr@0cost.org>
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>
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>
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>
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>
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 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>