-
-
Notifications
You must be signed in to change notification settings - Fork 300
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
Fail to call Rails.logger.silent #309
Comments
Same here. I'm trying to use graylog by following this tutorial, which uses lograge. Everything works fine in NoMethodError (undefined method 'silence_logger' for #<GELF::Logger:0x0000000007f5f170>)
|
Hi! If you look at the activerecord-session_store README it states:
So in your case you will add smthing like this in GELF::Logger.send :include, ActiveRecord::SessionStore::Extension::LoggerSilencer
config.logger = GELF::Logger.new(...) References: main answer, undefined method silence |
I just want to point out, if anyone comes across this issue after upgrading activerecord-session_store to 2.0, this no longer works even though their README still says what you quoted. At some point last year (I think it was a June 2020 commit), they removed I forked activerecord-session_store from the latest codebase (which fixes the CVE that sparked the need to release 2.0) and reinserted You can use it in your Gemfile like so
Hopefully they come up with a solution for this relatively soon though, I really dislike the idea of running a fork of something like this in production. |
I fail to call
Rails.logger.silence
inproduction
environment. Does your Logger includes somewhereActiveSupport::LoggerSilence
module ? It throws:I took a look at SilentLogger but didn't find a way to use it instead. Any idea?
5.2.3
2.6.5
The text was updated successfully, but these errors were encountered: