Skip to content

TECH-19528: LoggerWithContext support for predicates: debug? warn? info? error? fatal? - #78

Merged
ColinDKelley merged 12 commits into
masterfrom
TECH-19528/support-predicates-for-debug-warn-info-error-fatal
Sep 12, 2025
Merged

TECH-19528: LoggerWithContext support for predicates: debug? warn? info? error? fatal?#78
ColinDKelley merged 12 commits into
masterfrom
TECH-19528/support-predicates-for-debug-warn-info-error-fatal

Conversation

@ColinDKelley

Copy link
Copy Markdown
Contributor

[1.5.0] - 2025-09-11

Added

  • Added LoggerWithContext support for debug?, info?, warn?, error?, fatal?.

@ColinDKelley
ColinDKelley requested a review from a team as a code ownerSeptember 11, 2025 22:42
CopilotAI review requested due to automatic review settings September 11, 2025 22:42

CopilotAI left a comment

Copy link
Copy Markdown

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
FileDescription
lib/contextual_logger/logger_with_context.rbAdded predicate methods for each log level using metaprogramming
spec/lib/contextual_logger/logger_with_context_spec.rbAdded comprehensive test suite covering all log level predicates
lib/contextual_logger/version.rbBumped version to 1.5.0
CHANGELOG.mdAdded changelog entry for the new feature
.ruby-versionUpdated 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.

Comment threadlib/contextual_logger/logger_with_context.rb Outdated
@ColinDKelleyColinDKelley changed the title TECH-19528: support predicates for debug warn info error fatalTECH-19528: LoggerWithContext support for predicates: debug? warn? info? error? fatal?Sep 11, 2025
@ColinDKelley
ColinDKelleyforce-pushed the TECH-19528/support-predicates-for-debug-warn-info-error-fatal branch from e90cda5 to 4a616d1CompareSeptember 11, 2025 23:21
@ColinDKelley
ColinDKelleyforce-pushed the TECH-19528/support-predicates-for-debug-warn-info-error-fatal branch from 37fe7f7 to 87187b7CompareSeptember 11, 2025 23:30
@ColinDKelley

Copy link
Copy Markdown
ContributorAuthor

@ttstarck Can you please review the changes since you approved?

@ColinDKelley
ColinDKelleyforce-pushed the TECH-19528/support-predicates-for-debug-warn-info-error-fatal branch from bf1464d to 7b07968CompareSeptember 12, 2025 15:11
@ColinDKelley
ColinDKelley merged commit 6398a30 into masterSep 12, 2025
54 checks passed
@ColinDKelley
ColinDKelley deleted the TECH-19528/support-predicates-for-debug-warn-info-error-fatal branch September 12, 2025 20:57
Sign up for freeto 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.

3 participants

@ColinDKelley@ttstarck