-
Notifications
You must be signed in to change notification settings - Fork 1
TECH-19528: LoggerWithContext support for predicates: debug? warn? info? error? fatal? #78
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
TECH-19528: LoggerWithContext support for predicates: debug? warn? info? error? fatal? #78
Conversation
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 adds support for log level predicate methods (debug?, info?, warn?, error?, fatal?) to the LoggerWithContext class, allowing users to check if a specific log level is enabled before performing expensive logging operations.
Key Changes
- Implemented log level predicate methods that delegate to the existing log level checking logic
- Added comprehensive test coverage for all log level predicates across different severity levels
- Updated version from 1.4.0 to 1.5.0 to reflect the new feature
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/contextual_logger/logger_with_context.rb | Added predicate methods for each log level using metaprogramming |
| spec/lib/contextual_logger/logger_with_context_spec.rb | Added comprehensive test suite covering all log level predicates |
| lib/contextual_logger/version.rb | Bumped version to 1.5.0 |
| CHANGELOG.md | Added changelog entry for the new feature |
| .ruby-version | Updated Ruby version from 3.1.6 to 3.3.8 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
e90cda5 to
4a616d1
Compare
37fe7f7 to
87187b7
Compare
|
@ttstarck Can you please review the changes since you approved? |
bf1464d to
7b07968
Compare
[1.5.0] - 2025-09-11
Added
debug?,info?,warn?,error?,fatal?.