You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Following the documentation, I put Rails.logger.reset into config/puma.rb
On server start though, I get an error:
undefined method reset' for #ActiveSupport::Logger:0x00007f932cfdb148 6: from /Users/marina/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/puma-3.12.0/lib/puma/cluster.rb:137:in fork' (NoMethodError ( 5: from /Users/marina/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/puma-3.12.0/lib/puma/cluster.rb:137:in block (2 levels) in spawn_workers'
NoMethodErrorNoMethodError)`
Thanks and sorry if I'm missing something obvious here. KR
The text was updated successfully, but these errors were encountered:
After looking closer and going through merged PRs I found out that reset method was exposed and it is actually a feature, BUT:
If you run into this error, you still have Rails.logger not set to Logstash. If Logstash logging is conditional in your application, you better put Rails.logger.reset under a condition like if respond_to?(:reset) or if ENV['LOGSTASH_ENABLED'] like I did in my project.
Hi,
Following the documentation, I put Rails.logger.reset into config/puma.rb
On server start though, I get an error:
undefined method
reset' for #ActiveSupport::Logger:0x00007f932cfdb148 6: from /Users/marina/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/puma-3.12.0/lib/puma/cluster.rb:137:infork' (NoMethodError ( 5: from /Users/marina/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/puma-3.12.0/lib/puma/cluster.rb:137:in
block (2 levels) in spawn_workers'NoMethodErrorNoMethodError)`
Thanks and sorry if I'm missing something obvious here. KR
The text was updated successfully, but these errors were encountered: