Skip to content

LoggerSilence support within Rails #312

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

Merged
merged 2 commits into from
Aug 11, 2025
Merged

Conversation

kares
Copy link
Member

@kares kares commented Aug 11, 2025

second attempt at Rails' LoggerSilence (based on what was initially suggested #270), an alternative for #303

the previous approach made more sense but we can not really singleton_class.send(:include, ActiveSupport::LoggerSilence), in actual Rails...

(TypeError) module attributes should be defined directly on class, not singleton
	at RUBY.mattr_reader(/opt/local/rvm/gems/jruby-9.4.13.0@temp/gems/activesupport-7.2.2.1/lib/active_support/core_ext/module/attribute_accessors.rb:56)
	at RUBY.mattr_accessor(/opt/local/rvm/gems/jruby-9.4.13.0@temp/gems/activesupport-7.2.2.1/lib/active_support/core_ext/module/attribute_accessors.rb:210)
	at RUBY.LoggerSilence(/opt/local/rvm/gems/jruby-9.4.13.0@temp/gems/activesupport-7.2.2.1/lib/active_support/logger_silence.rb:12)
	at org.jruby.RubyModule.module_eval(org/jruby/RubyModule.java:3723)
	at org.jruby.RubyModule.module_eval(org/jruby/RubyModule.java:3754)
	at RUBY.append_features(/opt/local/rvm/gems/jruby-9.4.13.0@temp/gems/activesupport-7.2.2.1/lib/active_support/concern.rb:138)
	at org.jruby.RubyModule.include(org/jruby/RubyModule.java:3384)
	at RUBY.Railtie(uri:classloader:/jruby/rack/rails/railtie.rb:43)

@kares kares changed the title Logger silence dejavu re-invent LoggerSilence support within Rails Aug 11, 2025
@kares kares changed the title re-invent LoggerSilence support within Rails LoggerSilence support within Rails Aug 11, 2025
@kares kares merged commit 7c0aacd into jruby:master Aug 11, 2025
33 checks passed
@kares kares deleted the logger-silence-dejavu branch August 11, 2025 18:36
@kares kares added this to the 1.3.0 milestone Aug 12, 2025
Sign up for free to 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.

Adding silence to logger with middleware works with puma but not with tomcat9
1 participant