Skip to content

Commit 6ddf4d6

Browse files
mudgesolnic
andauthored
fix: add explicit dependency on logger for Ruby 4 (#2837)
Ruby 4.0 moved "logger" from being a default gem to a bundled one (see https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/#stdlib-updates and https://stdgems.org/logger/) so it now needs to be added as an explicit dependency. Without this, it will raise the following warning: warning: logger used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0. You can add logger to your Gemfile or gemspec to fix this error. Co-authored-by: Peter Solnica <peter@solnica.online>
1 parent 9a0dba3 commit 6ddf4d6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Unreleased
22

3+
### Bug Fixes
4+
5+
- Add explicit dependency on logger gem to fix Ruby 4.0 warning ([#2837](https://github.com/getsentry/sentry-ruby/pull/2837))
6+
37
### Internal
48

59
- Add external_propagation_context support ([#2841](https://github.com/getsentry/sentry-ruby/pull/2841))

sentry-ruby/sentry-ruby.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ Gem::Specification.new do |spec|
3030

3131
spec.add_dependency "concurrent-ruby", "~> 1.0", ">= 1.0.2"
3232
spec.add_dependency "bigdecimal"
33+
spec.add_dependency "logger"
3334
end

0 commit comments

Comments
 (0)