Remove hardcoded master_debug = True flag from api_calls.py #28

Closed
opened 2026-02-20 06:51:44 +00:00 by cal · 1 comment
Owner

api_calls.py:20 — Every API request/response (up to 300,000 chars via log_return_value) is logged at INFO level regardless of LOG_LEVEL. Performance and log volume concern in production.

`api_calls.py:20` — Every API request/response (up to 300,000 chars via `log_return_value`) is logged at INFO level regardless of LOG_LEVEL. Performance and log volume concern in production.
cal added the
performance
tech-debt
labels 2026-02-20 06:51:44 +00:00
cal added the
ai-working
ai-working
labels 2026-03-05 10:31:31 +00:00
cal added
ai-pr-opened
and removed
ai-working
labels 2026-03-05 10:32:37 +00:00
Author
Owner

Fixed in PR #58: #58

Approach: Removed master_debug = True and replaced all 5 logger.info(...) if master_debug else logger.debug(...) ternary calls with unconditional logger.debug(...). Also fixed log_return_value() to use logger.debug instead of logger.info, and removed the associated dead commented-out code. API requests/responses will now only appear in logs when LOG_LEVEL=DEBUG is set.

Fixed in PR #58: https://git.manticorum.com/cal/paper-dynasty-discord/pulls/58 **Approach:** Removed `master_debug = True` and replaced all 5 `logger.info(...) if master_debug else logger.debug(...)` ternary calls with unconditional `logger.debug(...)`. Also fixed `log_return_value()` to use `logger.debug` instead of `logger.info`, and removed the associated dead commented-out code. API requests/responses will now only appear in logs when `LOG_LEVEL=DEBUG` is set.
cal removed the
ai-working
label 2026-03-05 10:32:44 +00:00
cal closed this issue 2026-03-09 13:26:17 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-discord#28
No description provided.