-
Notifications
You must be signed in to change notification settings - Fork 168
fix: fix logger config overwrite problem #765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Alanxtl
commented
Sep 24, 2025
- fix logger config overwrite problem
- add test file for logger/controller
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #765 +/- ##
============================================
- Coverage 54.67% 16.20% -38.47%
============================================
Files 671 220 -451
Lines 78658 16430 -62228
============================================
- Hits 43006 2663 -40343
+ Misses 31981 13530 -18451
+ Partials 3671 237 -3434
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request fixes a logger configuration overwrite problem and adds comprehensive test coverage for the logger module. The main issue was that changing log levels at runtime would incorrectly rebuild the entire logger instead of just updating the level atomically.
- Fixed SetLoggerLevel to use atomic level updates instead of rebuilding the logger
- Added comprehensive test coverage for logger functionality and controller behavior
- Improved code organization and documentation for better maintainability
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
pkg/logger/logger_test.go | Complete rewrite with new comprehensive tests for stacktrace control, level changes, hot reload, and caller encoding |
pkg/logger/logger.go | Refactored initialization logic with better error handling and unified build options |
pkg/logger/controller_test.go | New test file covering controller functionality including level parsing and basic usage |
pkg/logger/controller.go | Fixed SetLoggerLevel to use atomic updates and improved parseLevel function |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|