quart.logging module¶
-
class
quart.logging.
LocalQueueHandler
(queue)¶ Bases:
logging.handlers.QueueHandler
Custom 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: logging.LogRecord) → logging.LogRecord¶ Prepares 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.
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.
-
-
quart.logging.
create_logger
(app: Quart) → logging.Logger¶ Create a logger for the app based on the app settings.
This creates a logger named quart.app that has a log level based on the app configuration.
-
quart.logging.
create_serving_logger
() → logging.Logger¶ Create a logger for serving.
This creates a logger named quart.serving.