解决办法: from loguru import logger from sentry_sdk.integrations.logging import ( LoggingIntegration, BreadcrumbHandler, EventHandler, ) . . . if settings.sentry_dsn: _ = logger.add( BreadcrumbHandler(level=logging.DEBUG), diagnose=se
解决办法:
from loguru import loggerfrom sentry_sdk.integrations.logging import (
LoggingIntegration,
BreadcrumbHandler,
EventHandler,
)
.
.
.
if settings.sentry_dsn:
_ = logger.add(
BreadcrumbHandler(level=logging.DEBUG),
diagnose=settings.loguru_diagnose,
level=logging.DEBUG,
)
_ = logger.add(
EventHandler(level=logging.ERROR),
diagnose=settings.loguru_diagnose,
level=logging.ERROR,
)
integrations = [
LoggingIntegration(level=None, event_level=None),
]
链接:https://github.com/getsentry/sentry-python/issues/653
作者:削微寒