Skip to content

feat: add a logger filtering flag#886

Open
zilin wants to merge 2 commits intosipeed:mainfrom
zilin:feat/logger-filtering
Open

feat: add a logger filtering flag#886
zilin wants to merge 2 commits intosipeed:mainfrom
zilin:feat/logger-filtering

Conversation

@zilin
Copy link

@zilin zilin commented Feb 27, 2026

📝 Description

🗣️ Type of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • [*] ✨ New feature (non-breaking change which adds functionality)
  • 📖 Documentation update
  • ⚡ Code refactoring (no functional changes, no api changes)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)
  • [*] 🛠️ Mostly AI-generated (AI draft, Human verified/modified)
  • 👨‍💻 Mostly Human-written (Human lead, AI assisted or none)

🔗 Related Issue

📚 Technical Context (Skip for Docs)

  • Reference URL:
  • Reasoning:

🧪 Test Environment

  • Hardware:
  • OS:
  • Model/Provider:
  • Channels:

📸 Evidence (Optional)

Click to view Logs/Screenshots

☑️ Checklist

  • My code/docs follow the style of this project.
  • I have performed a self-review of my own changes.
  • I have updated the documentation accordingly.

Copy link

@nikolasdehor nikolasdehor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean implementation of a useful debugging feature. A few minor notes: (1) Performance: logMessage now takes mu.RLock() on every call. Under heavy logging this could become a bottleneck. Consider using atomic.Pointer for the filter map so the hot path avoids the lock entirely. Not a blocker. (2) PR description: Please fill in the template. (3) Test isolation: The test does not reset currentLevel — consider adding cleanup in t.Cleanup to restore defaults. LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants