Sha256: 375ad58a6691ad05f4f994326fdda339ead22d8cb6d914231e1fa3b7d5e32e7d

Contents?: true

Size: 542 Bytes

Versions: 5

Compression:

Stored size: 542 Bytes

Contents

module Logster
  class Configuration
    attr_accessor :current_context, :allow_grouping, :environments, :application_version
    attr_writer :subdirectory

    def initialize
      # lambda |env,block|
      @current_context = lambda{ |_, &block| block.call }
      @environments = [:development, :production]
      @subdirectory = nil

      @allow_grouping = false
      if defined?(::Rails) && ::Rails.env.production?
        @allow_grouping = true
      end
    end

    def subdirectory
      @subdirectory || '/logs'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
logster-1.0.0.1.pre lib/logster/configuration.rb
logster-1.0.0.0.pre lib/logster/configuration.rb
logster-0.9.9 lib/logster/configuration.rb
logster-0.8.4.8.pre lib/logster/configuration.rb
logster-0.8.4.7.pre lib/logster/configuration.rb