mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
50d6a9b5c8
commit
409229739e
2 changed files with 64 additions and 1 deletions
|
@ -14,7 +14,9 @@ handlers=
|
|||
propogate=0
|
||||
|
||||
[logger_aurweb]
|
||||
level=INFO
|
||||
; This loglevel is set to DEBUG for tests where we expect specific
|
||||
; debug logging to occur. In production, this should be set to INFO.
|
||||
level=DEBUG
|
||||
handlers=simpleHandler
|
||||
qualname=aurweb
|
||||
propagate=1
|
||||
|
|
61
logging.prod.conf
Normal file
61
logging.prod.conf
Normal file
|
@ -0,0 +1,61 @@
|
|||
; This logger should be used in production, as it limits the logging
|
||||
; done to INFO. The main logger uses DEBUG and is purely meant for
|
||||
; debugging and unit tests.
|
||||
[loggers]
|
||||
keys=root,aurweb,uvicorn,hypercorn,alembic
|
||||
|
||||
[handlers]
|
||||
keys=simpleHandler,detailedHandler
|
||||
|
||||
[formatters]
|
||||
keys=simpleFormatter,detailedFormatter
|
||||
|
||||
[logger_root]
|
||||
level=INFO
|
||||
; We add NullHandler programmatically.
|
||||
handlers=
|
||||
propogate=0
|
||||
|
||||
[logger_aurweb]
|
||||
level=INFO
|
||||
handlers=simpleHandler
|
||||
qualname=aurweb
|
||||
propagate=1
|
||||
|
||||
[logger_uvicorn]
|
||||
level=INFO
|
||||
handlers=simpleHandler
|
||||
qualname=uvicorn
|
||||
propagate=0
|
||||
|
||||
[logger_hypercorn]
|
||||
level=INFO
|
||||
handlers=simpleHandler
|
||||
qualname=hypercorn
|
||||
propagate=0
|
||||
|
||||
[logger_alembic]
|
||||
level=INFO
|
||||
handlers=simpleHandler
|
||||
qualname=alembic
|
||||
propagate=0
|
||||
|
||||
[handler_simpleHandler]
|
||||
class=StreamHandler
|
||||
level=DEBUG
|
||||
formatter=simpleFormatter
|
||||
args=(sys.stdout,)
|
||||
|
||||
[handler_detailedHandler]
|
||||
class=StreamHandler
|
||||
level=DEBUG
|
||||
formatter=detailedFormatter
|
||||
args=(sys.stdout,)
|
||||
|
||||
[formatter_simpleFormatter]
|
||||
format=%(asctime)s %(levelname)-5s | %(name)s: %(message)s
|
||||
datefmt=%H:%M:%S
|
||||
|
||||
[formatter_detailedFormatter]
|
||||
format=%(asctime)s %(levelname)-5s | %(name)s.%(funcName)s() @ L%(lineno)d: %(message)s
|
||||
datefmt=%H:%M:%S
|
Loading…
Add table
Reference in a new issue