Sha256: 5950f2646f7e1ef8118e462cfa436bc2a7a928486f91b2ffb07737e3a895c98b

Contents?: true

Size: 719 Bytes

Versions: 3

Compression:

Stored size: 719 Bytes

Contents

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

    attr_writer :subdirectory

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

      @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.3.1 lib/logster/configuration.rb
logster-2.3.0 lib/logster/configuration.rb
logster-2.2.0 lib/logster/configuration.rb