quart.logging module
- class quart.logging.LocalQueueHandler(queue)
Bases:
QueueHandlerCustom QueueHandler that skips record preparation.
There is no need to prepare records that go into a local, in-process queue, we can skip that process and minimise the cost of logging further.
- prepare(record)
Prepare a record for queuing. The object returned by this method is enqueued.
The base implementation formats the record to merge the message and arguments, and removes unpickleable items from the record in-place. Specifically, it overwrites the record’s
msgandmessageattributes with the merged message (obtained by calling the handler’sformatmethod), and sets theargs,exc_infoandexc_textattributes to None.You might want to override this method if you want to convert the record to a dict or JSON string, or send a modified copy of the record while leaving the original intact.
- Parameters:
record (LogRecord)
- Return type:
LogRecord
- quart.logging.has_level_handler(logger)
Check if the logger already has a handler
- Parameters:
logger (Logger)
- Return type:
bool