Skip to content

Commit

Permalink
Set ActionView::Base#logger= only if supported (i.e. if on Rails >= 4)
Browse files Browse the repository at this point in the history
  • Loading branch information
meineerde committed Jul 5, 2016
1 parent c07a0fe commit 5b80402
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rackstash/framework/rails3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setup(config={})
ActiveRecord::Base.logger = Rackstash.logger if defined?(ActiveRecord::Base)
ActionController::Base.logger = Rackstash.logger if defined?(ActionController::Base)
# New in Rails 4
ActionView::Base.logger = Rackstash.logger if defined?(ActionView::Base)
ActionView::Base.logger = Rackstash.logger if defined?(ActionView::Base) && ActionView::Base.respond_to?(:logger=)
end
# The ANSI color codes in the ActiveRecord logs don't help much in
# plain JSON
Expand Down

0 comments on commit 5b80402

Please sign in to comment.