Will
10/29/2021, 3:10 PMKevin Kho
import logging
class StructlogHandler(logging.Handler):
"""
Feeds all events back into structlog.
"""
def __init__(self, *args, **kw):
super(StructlogHandler, self).__init__(*args, **kw)
self._log = structlog.get_logger()
def emit(self, record):
self._log.log(record.levelno, record.msg, name=record.name)
and then you can try adding it to the Prefect logger like this . This is the best example I have I think. It adds a FileHandler. In your case, you would add the StructlogHandlerKevin Kho
Will
10/29/2021, 3:21 PMWill
10/29/2021, 3:22 PMKevin Kho
Kevin Kho
Will
10/29/2021, 3:27 PMWill
10/29/2021, 3:27 PMWilliam Grim
10/30/2021, 3:28 AMWilliam Grim
10/30/2021, 3:29 AMWill
11/01/2021, 10:33 AM