Skip to content

Commit

Permalink
Merge pull request #3 from ybart/master
Browse files Browse the repository at this point in the history
Fix incompatibility with rails_stdout_logging gem
  • Loading branch information
phallguy committed Mar 20, 2015
2 parents b4d7baf + 7de04df commit e654330
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/shog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ module Shog
# Set up formatting options for the default rails logger.
# @see Shog::Formatter#configure
def self.configure(&block)
::Rails.logger.formatter.configure &block
::Rails.logger.formatter = Shog::Formatter.new.configure &block
end
end
end
1 change: 1 addition & 0 deletions lib/shog/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module Rails
# Automatically integrate Shog with the rails logger.
class Railtie < ::Rails::Railtie
config.before_initialize do
next if ::Rails.logger.formatter.class == Shog::Formatter
::Rails.logger.formatter = Shog::Formatter.new.configure do
with :defaults
with :requests
Expand Down

0 comments on commit e654330

Please sign in to comment.