log
InterceptHandler
Bases: Handler
Handler for intercepting records and outputting to loguru.
Source code in app/core/log.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
emit(record)
Intercepts log messages. Intercepts log records sent to the handler, adds additional context to the records, and outputs the record to the default loguru logger.
record: The log record
Source code in app/core/log.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|
Logger
Bases: Logger
Implements and overrides the gunicorn logging interface.
This class inherits from the standard gunicorn logger and overrides it by
replacing the handlers with InterceptHandler
in order to route the
gunicorn logs to loguru.
Source code in app/core/log.py
15 16 17 18 19 20 21 22 23 24 25 26 |
|