Sha256: 365bcde06ec7570bd7fda28174b7825a2b1657d8500e9d5ba542e0a27309fdde

Contents?: true

Size: 379 Bytes

Versions: 2

Compression:

Stored size: 379 Bytes

Contents

require 'thoth/rails/controller_context'
require 'thoth/rails/model'

module Thoth
  class Railtie < ::Rails::Railtie
    initializer "thoth.configure_rails_initialization" do
      Thoth.logger ||= (
        file = File.open(::Rails.root.join(*%W[log events_#{::Rails.env}.log]), 'a')
        file.sync = true
        Logger.new(Output::Json.new(file))
      )
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thoth-3.0.0 lib/thoth/rails/railtie.rb
thoth-2.0.0 lib/thoth/rails/railtie.rb