Hi again everyone, our company has our own logger ...
# prefect-community
a
Hi again everyone, our company has our own logger class (based on the excellent Loguru) which we use as a drop in replacement for the standard logger. Is there a way to use it in Prefect? Can I replace Prefect’s logger with ours? Or redirect Prefect’s logger to ours as a handler? Thank you again all.
c
Hi @Aiden Price! Yup absolutely; I’d recommend adding a
LoggerHandler
to the root Prefect logger (which can be accessed at
prefect.utilities.logging.get_logger()
) which emits logs to Loguru: https://docs.prefect.io/core/tutorials/custom-logs.html#adding-handlers Let me know if those instructions are unclear or don’t work for your use case