Bibliothèque Standard Logging¶
Logfirepeut agir comme récepteur pour le journal de la bibliothèque standard en émettant un journalLogfirepour chaque journal de la bibliothèque standard.
main.py
from logging import basicConfig, getLogger
import logfire
logfire.configure()
basicConfig(handlers=[logfire.LogfireLoggingHandler()])
logger = getLogger(__name__)
logger.error("Hello %s!", "Fred")
# 10:05:06.855 Hello Fred!
本文总阅读量次