TECH-19528: LoggerWithContext support for predicates: debug? warn? info? error? fatal?#78
Merged
ColinDKelley merged 12 commits intomasterfrom Sep 12, 2025
Conversation
There was a problem hiding this comment.
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.
ttstarck
approved these changes
Sep 11, 2025
e90cda5 to
4a616d1
Compare
37fe7f7 to
87187b7
Compare
Contributor
Author
|
@ttstarck Can you please review the changes since you approved? |
ttstarck
approved these changes
Sep 12, 2025
bf1464d to
7b07968
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[1.5.0] - 2025-09-11
Added
debug?,info?,warn?,error?,fatal?.