NoMethodError `silence` On Logger Instance

Posted by Weston Ganger on January 12, 2017

After upgrading to Rails 4 from Rails 3 I was seeing this error: NoMethodError 'silence' on Logger instance. The problem had to do with a Log rotation I had in place, this just required a quick fix to the class name

# old code
config.logger = Logger.new(config.paths['log'].first, 100, 104857600)

# new code
config.logger = ActiveSupport::Logger.new(config.paths['log'].first, 100, 104857600)

Related External Links:

Posted in Rails and Tagged with logger rails 

Want me to help develop your next project or application?

Contact Us

Specializing in Ruby-on-Rails, Javascript, Multi-Platform Electron Desktop Apps and Hybrid Cordova Mobile Apps.

Recommended Posts