Ugochukwu Odunukwe
Ugochukwu Odunukwe

Reputation: 1

Why does my Python logger not report to Sentry?

What is the best way to implement sentry logging with breadcrumb for a python flask project.

sentry_logging = LoggingIntegration(
    level=logging.INFO,        # Capture info and above as breadcrumbs
    event_level=logging.ERROR  # Send errors as events
)

I have tried with Logging.info to get the breadcrumb but it logs for warning.

Upvotes: 0

Views: 513

Answers (1)

Markus Unterwaditzer
Markus Unterwaditzer

Reputation: 8244

Your logger likely has set the level to WARNING.

mylogger.setLevel(logging.INFO)

By the way, you do not have to configure the logging integration explicitly as the levels you're configuring the SDK with are the default already.

Upvotes: 1

Related Questions