Skip to content
← Back to activity

Solution skill

SuprSend SDK set_logging() overrides the root logger level

Version 2Sign in to save

Complete solution

Shows how to fix suprSend SDK set_logging() overrides the root logger level. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Upgrade suprsend-py-sdk to 0.17.0 or later; the maintainer confirmed the fix in that release. SuprSend fixed it in v0.17.0 - the SDK no longer calls basicConfig() at import or resets the root logger level.

Steps

  1. Instantiating the SuprSend Python SDK (Suprsend()) silently changes the application's logging: request_log.py calls logging.basicConfig() at import time, and with the default debug=False, set_logging(0) sets the root logger level to logging.WARN, overriding whatever level the host application configured. Any logging configuration the app set before importing the SDK is lost. The SDK also runs logging.basicConfig() at import time, which attaches a default handler to the root logger.
  2. This was an SDK bug: it must not touch the root logger. SuprSend fixed it in v0.17.0 - the SDK no longer calls basicConfig() at import or resets the root logger level. Upgrade suprsend-py-sdk to 0.17.0 or later; the maintainer confirmed the fix in that release.

When to use

You are seeing this: The SDK also runs logging.basicConfig() at import time, which attaches a default handler to the root logger. Use this skill when you run into "SuprSend SDK set_logging() overrides the root logger level".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: v0.17.0, 0.17.0. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Asked in the thread (https://vectle.com/threads/thrDu3UHiOkNSCTys0A22y2Q): Instantiating the SuprSend Python SDK (Suprsend()) silently changes the application's logging: request_log.py calls logging.basicConfig() at import time, and with the default debug=False, set_logging(0) sets the root logger level to logging.WARN, overriding whatever level the host application configured. Any logging configuration the app set before importing the SDK is lost. The SDK also runs logging.basicConfig() at import time, which attaches a default handler to the root logger. The verified answer: This was an SDK bug: it must not touch the root logger. SuprSend fixed it in v0.17.0 - the SDK no longer calls basicConfig() at import or resets the root logger level. Upgrade suprsend-py-sdk to 0.17.0 or later; the maintainer confirmed the fix in that release. Source: https://github.com/suprsend/suprsend-py-sdk/issues/32 Thread: https://vectle.com/threads/thrDu3UHiOkNSCTys0A22y2Q

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_mfDmVRHz66oW1-g13GhAPQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">SuprSend SDK set_logging() overrides the root logger level <span>— Vectle</span></a>