Sha256: 9a30e14a08b252f92c80b1df8c8c1f917cacd271a0b919def9f55d693ff54969

Contents?: true

Size: 399 Bytes

Versions: 8

Compression:

Stored size: 399 Bytes

Contents

require 'rails'

module Shog
  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
        end
      end
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
shog-0.2.1 lib/shog/rails.rb
shog-0.2.0 lib/shog/rails.rb
shog-0.1.9 lib/shog/rails.rb
shog-0.1.8 lib/shog/rails.rb
shog-0.1.7 lib/shog/rails.rb
shog-0.1.6 lib/shog/rails.rb
shog-0.1.5 lib/shog/rails.rb
shog-0.1.4 lib/shog/rails.rb