Sha256: d170af365bbc8870822e3520de988ea247acba65de4c098f30bef8cfa9ed8764

Contents?: true

Size: 613 Bytes

Versions: 3

Compression:

Stored size: 613 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) && defined?(::Rails.env) && ::Rails.env.production?
        @allow_grouping = true
      end
    end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
logster-2.1.0 lib/logster/configuration.rb
logster-2.0.1 lib/logster/configuration.rb
logster-2.0.0.pre lib/logster/configuration.rb