prefect.logging.handlers
APILogWorker
instance
max_batch_size
min_interval
APILogHandler
APILogWorker
which manages sending batches of logs in
the background.
Methods:
aflush
APILogWorker
to send any currently enqueued logs and block until
completion.
emit
APILogWorker
flush
APILogWorker
to send any currently enqueued logs and block until
completion.
Use aflush
from async contexts instead.
handleError
prepare
logging.LogRecord
to the API LogCreate
schema and serialize.
This infers the linked flow or task run from the log record or the current
run context.
If a flow run id cannot be found, the log will be dropped.
Logs exceeding the maximum size will be dropped.
WorkerAPILogHandler
aflush
APILogWorker
to send any currently enqueued logs and block until
completion.
emit
emit
APILogWorker
flush
APILogWorker
to send any currently enqueued logs and block until
completion.
Use aflush
from async contexts instead.
handleError
prepare
logging.LogRecord
to the API LogCreate
schema and serialize.
This will add in the worker id to the log.
Logs exceeding the maximum size will be dropped.
prepare
logging.LogRecord
to the API LogCreate
schema and serialize.
This infers the linked flow or task run from the log record or the current
run context.
If a flow run id cannot be found, the log will be dropped.
Logs exceeding the maximum size will be dropped.
PrefectConsoleHandler
emit