Skip to content

Commit 6398a30

Browse files
authored
Merge pull request #78 from Invoca/TECH-19528/support-predicates-for-debug-warn-info-error-fatal
TECH-19528: LoggerWithContext support for predicates: debug? warn? info? error? fatal?
2 parents 86369a5 + 7b07968 commit 6398a30

15 files changed

Lines changed: 153 additions & 56 deletions

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
ruby: [3.1, 3.2, 3.3]
11+
ruby: [3.3, 3.4]
1212
gemfile:
1313
- Gemfile
14-
- gemfiles/activesupport_6_0.gemfile
15-
- gemfiles/activesupport_6_1.gemfile
1614
- gemfiles/activesupport_7_0.gemfile
1715
- gemfiles/activesupport_7_1.gemfile
16+
- gemfiles/activesupport_7_2.gemfile
17+
- gemfiles/activesupport_8_0.gemfile
1818
env:
1919
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
2020
steps:

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.6
1+
3.3.8

Appraisals

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
require 'appraisal/matrix'
44

5-
appraisal_matrix(activesupport: "6.0")
5+
appraisal_matrix(activesupport: "7.0")

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
44

55
Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.5.0] - 2025-09-12
8+
### Added
9+
- Added LoggerWithContext support for `debug?`, `info?`, `warn?`, `error?`, `fatal?`.
10+
### Changed
11+
- Raise ArgumentError if context keys are not symbols. (Was documented to start in v1.0.0 but was not implemented until now.)
12+
713
## [1.4.0] - 2024-07-10
814
### Added
915
- Added support for `activesupport` 7.1 by providing a mixin for extending Broadcast loggers.

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ gem 'coveralls', require: false
99
gem 'appraisal'
1010
gem 'appraisal-matrix'
1111
gem 'bump', '~> 0.6.1'
12+
gem 'mutex_m'
1213
gem 'pry'
1314
gem 'rake'
1415
gem 'rubocop', '0.54.0'

Gemfile.lock

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,40 @@
11
PATH
22
remote: .
33
specs:
4-
contextual_logger (1.4.0)
4+
contextual_logger (1.5.0)
55
activesupport (>= 6.0)
66
json
77

88
GEM
99
remote: https://rubygems.org/
1010
specs:
11-
activesupport (7.1.3.4)
11+
activesupport (8.0.2.1)
1212
base64
13+
benchmark (>= 0.3)
1314
bigdecimal
14-
concurrent-ruby (~> 1.0, >= 1.0.2)
15+
concurrent-ruby (~> 1.0, >= 1.3.1)
1516
connection_pool (>= 2.2.5)
1617
drb
1718
i18n (>= 1.6, < 2)
19+
logger (>= 1.4.2)
1820
minitest (>= 5.1)
19-
mutex_m
20-
tzinfo (~> 2.0)
21+
securerandom (>= 0.3)
22+
tzinfo (~> 2.0, >= 2.0.5)
23+
uri (>= 0.13.1)
2124
appraisal (2.5.0)
2225
bundler
2326
rake
2427
thor (>= 0.14.0)
2528
appraisal-matrix (0.2.0)
2629
appraisal (~> 2.2)
2730
ast (2.4.2)
28-
base64 (0.2.0)
29-
bigdecimal (3.1.8)
31+
base64 (0.3.0)
32+
benchmark (0.4.1)
33+
bigdecimal (3.2.3)
3034
bump (0.6.1)
3135
coderay (1.1.3)
32-
concurrent-ruby (1.3.3)
33-
connection_pool (2.4.1)
36+
concurrent-ruby (1.3.5)
37+
connection_pool (2.5.4)
3438
coveralls (0.8.23)
3539
json (>= 1.8, < 3)
3640
simplecov (~> 0.16.1)
@@ -39,13 +43,14 @@ GEM
3943
tins (~> 1.6)
4044
diff-lcs (1.5.0)
4145
docile (1.4.0)
42-
drb (2.2.1)
43-
i18n (1.14.5)
46+
drb (2.2.3)
47+
i18n (1.14.7)
4448
concurrent-ruby (~> 1.0)
4549
json (2.6.3)
50+
logger (1.7.0)
4651
method_source (1.0.0)
47-
minitest (5.24.1)
48-
mutex_m (0.2.0)
52+
minitest (5.25.5)
53+
mutex_m (0.3.0)
4954
parallel (1.23.0)
5055
parser (3.2.2.3)
5156
ast (~> 2.4.1)
@@ -85,6 +90,7 @@ GEM
8590
ruby-prof-flamegraph (0.3.0)
8691
ruby-prof (~> 0.13)
8792
ruby-progressbar (1.13.0)
93+
securerandom (0.4.1)
8894
simplecov (0.16.1)
8995
docile (~> 1.1)
9096
json (>= 1.8, < 3)
@@ -93,12 +99,13 @@ GEM
9399
sync (0.5.0)
94100
term-ansicolor (1.7.1)
95101
tins (~> 1.0)
96-
thor (1.3.1)
102+
thor (1.4.0)
97103
tins (1.32.1)
98104
sync
99105
tzinfo (2.0.6)
100106
concurrent-ruby (~> 1.0)
101107
unicode-display_width (1.8.0)
108+
uri (1.0.3)
102109

103110
PLATFORMS
104111
ruby
@@ -109,6 +116,7 @@ DEPENDENCIES
109116
bump (~> 0.6.1)
110117
contextual_logger!
111118
coveralls
119+
mutex_m
112120
pry
113121
rake
114122
rspec

gemfiles/activesupport_7_0.gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ source "https://rubygems.org"
44

55
gem "coveralls", require: false
66
gem "appraisal"
7-
gem "appraisal-matrix", "0.1.0"
7+
gem "appraisal-matrix"
88
gem "bump", "~> 0.6.1"
9+
gem "mutex_m"
910
gem "pry"
1011
gem "rake"
1112
gem "rubocop", "0.54.0"

gemfiles/activesupport_7_1.gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ source "https://rubygems.org"
44

55
gem "coveralls", require: false
66
gem "appraisal"
7-
gem "appraisal-matrix", "0.1.0"
7+
gem "appraisal-matrix"
88
gem "bump", "~> 0.6.1"
9+
gem "mutex_m"
910
gem "pry"
1011
gem "rake"
1112
gem "rubocop", "0.54.0"

gemfiles/activesupport_7_2.gemfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "coveralls", require: false
6+
gem "appraisal"
7+
gem "appraisal-matrix"
8+
gem "bump", "~> 0.6.1"
9+
gem "mutex_m"
10+
gem "pry"
11+
gem "rake"
12+
gem "rubocop", "0.54.0"
13+
gem "rubocop-git"
14+
gem "ruby-prof"
15+
gem "ruby-prof-flamegraph"
16+
gem "rspec"
17+
gem "rspec_junit_formatter"
18+
gem "activesupport", "~> 7.2.0"
19+
20+
gemspec path: "../"

gemfiles/activesupport_8_0.gemfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "coveralls", require: false
6+
gem "appraisal"
7+
gem "appraisal-matrix"
8+
gem "bump", "~> 0.6.1"
9+
gem "mutex_m"
10+
gem "pry"
11+
gem "rake"
12+
gem "rubocop", "0.54.0"
13+
gem "rubocop-git"
14+
gem "ruby-prof"
15+
gem "ruby-prof-flamegraph"
16+
gem "rspec"
17+
gem "rspec_junit_formatter"
18+
gem "activesupport", "~> 8.0.0"
19+
20+
gemspec path: "../"

0 commit comments

Comments
 (0)