This commit is contained in:
parent
576f06671a
commit
89a9cd1773
68
logging_production.ini
Normal file
68
logging_production.ini
Normal file
@ -0,0 +1,68 @@
|
||||
[loggers]
|
||||
keys = root, gunicorn.error, gunicorn.access, uvicorn
|
||||
|
||||
[handlers]
|
||||
keys = console, file, access_file, uvicorn_file
|
||||
|
||||
[formatters]
|
||||
keys = generic, access, uvicorn
|
||||
|
||||
[logger_root]
|
||||
level = INFO
|
||||
handlers = console
|
||||
|
||||
[logger_gunicorn.error]
|
||||
level = INFO
|
||||
handlers = file
|
||||
qualname = gunicorn.error
|
||||
propagate = 0
|
||||
|
||||
[logger_gunicorn.access]
|
||||
level = INFO
|
||||
handlers = access_file
|
||||
qualname = gunicorn.access
|
||||
propagate = 0
|
||||
|
||||
[logger_uvicorn]
|
||||
level = INFO
|
||||
handlers = uvicorn_file
|
||||
qualname = uvicorn
|
||||
propagate = 0
|
||||
|
||||
[handler_console]
|
||||
class = StreamHandler
|
||||
level = INFO
|
||||
formatter = generic
|
||||
args = (sys.stdout,)
|
||||
|
||||
[handler_file]
|
||||
class = FileHandler
|
||||
level = INFO
|
||||
formatter = generic
|
||||
args = ('gunicorn.log', 'a')
|
||||
|
||||
[handler_access_file]
|
||||
class = FileHandler
|
||||
level = INFO
|
||||
formatter = access
|
||||
args = ('gunicorn_access.log', 'a')
|
||||
|
||||
[handler_uvicorn_file]
|
||||
class = FileHandler
|
||||
level = INFO
|
||||
formatter = uvicorn
|
||||
args = ('uvicorn.log', 'a')
|
||||
|
||||
[formatter_generic]
|
||||
format = %(asctime)s [%(levelname)s] %(name)s: %(message)s
|
||||
datefmt = %Y-%m-%d %H:%M:%S
|
||||
class = logging.Formatter
|
||||
|
||||
[formatter_access]
|
||||
format = %(h)s %(l)s %(u)s %(t)s %(r)s %(s)s %(b)s %(f)s %(a)s
|
||||
class = logging.Formatter
|
||||
|
||||
[formatter_uvicorn]
|
||||
format = %(asctime)s - %(levelname)s - %(message)s
|
||||
datefmt = %Y-%m-%d %H:%M:%S
|
||||
class = logging.Formatter
|
Loading…
Reference in New Issue
Block a user