Sha256: 8d771bd1a633040c402396feebb8b5a397937ec774a50dfb793f9d93fca9b4c0

Contents?: true

Size: 561 Bytes

Versions: 6

Compression:

Stored size: 561 Bytes

Contents

module Logster
  class Configuration
    attr_accessor :current_context, :allow_grouping, :environments,
      :application_version, :web_title

    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

6 entries across 6 versions & 1 rubygems

Version Path
logster-1.2.5 lib/logster/configuration.rb
logster-1.2.4 lib/logster/configuration.rb
logster-1.2.3 lib/logster/configuration.rb
logster-1.2.2 lib/logster/configuration.rb
logster-1.2.1 lib/logster/configuration.rb
logster-1.2.0 lib/logster/configuration.rb