Skip to content

Commit 6d2d4de

Browse files
bakerboy448claude
andcommitted
feat: add TRACE level logging for Reddit API debugging
Added TRACE level (level 5) logging for prawcore and urllib3 when debug mode is enabled, providing detailed Reddit API request/response information for troubleshooting authentication and API issues. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2d39cb8 commit 6d2d4de

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

modlog_wiki_publisher.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,11 @@ def setup_logging(debug: bool = False):
11471147
level=level,
11481148
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
11491149
)
1150+
1151+
# Set prawcore and urllib3 to TRACE level for Reddit API debugging when debug is enabled
1152+
if debug:
1153+
logging.getLogger("prawcore").setLevel(5) # TRACE level (below DEBUG)
1154+
logging.getLogger("urllib3.connectionpool").setLevel(5) # TRACE level
11501155

11511156
def show_config_limits():
11521157
"""Display configuration limits and defaults"""

0 commit comments

Comments
 (0)