Skip to content

Loguru

Logfire can act as a sink for Loguru by emitting a Logfire log for every log record. For example:

main.py
import logfire
from loguru import logger

logfire.configure()

logger.configure(handlers=[logfire.loguru_handler()])
logger.info('Hello, {name}!', name='World')

Note

Currently, Logfire will not scrub sensitive data from the message formatted by Loguru, e.g:

logger.info('Foo: {bar}', bar='secret_value')
# > 14:58:26.085 Foo: secret_value