Sha256: fbc57dba135347baddece6a896eae3c457213219ccb824ace8f1736b9cced09b

Contents?: true

Size: 587 Bytes

Versions: 6

Compression:

Stored size: 587 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

6 entries across 6 versions & 1 rubygems

Version Path
logster-1.3.1 lib/logster/configuration.rb
logster-1.2.11 lib/logster/configuration.rb
logster-1.2.9 lib/logster/configuration.rb
logster-1.2.8 lib/logster/configuration.rb
logster-1.2.7 lib/logster/configuration.rb
logster-1.2.6 lib/logster/configuration.rb