Class: Logster::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/logster/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/logster/configuration.rb', line 8

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

Instance Attribute Details

#allow_groupingObject

Returns the value of attribute allow_grouping.



3
4
5
# File 'lib/logster/configuration.rb', line 3

def allow_grouping
  @allow_grouping
end

#application_versionObject

Returns the value of attribute application_version.



3
4
5
# File 'lib/logster/configuration.rb', line 3

def application_version
  @application_version
end

#current_contextObject

Returns the value of attribute current_context.



3
4
5
# File 'lib/logster/configuration.rb', line 3

def current_context
  @current_context
end

#enable_custom_patterns_via_uiObject

Returns the value of attribute enable_custom_patterns_via_ui.



3
4
5
# File 'lib/logster/configuration.rb', line 3

def enable_custom_patterns_via_ui
  @enable_custom_patterns_via_ui
end

#env_expandable_keysObject

Returns the value of attribute env_expandable_keys.



3
4
5
# File 'lib/logster/configuration.rb', line 3

def env_expandable_keys
  @env_expandable_keys
end

#environmentsObject

Returns the value of attribute environments.



3
4
5
# File 'lib/logster/configuration.rb', line 3

def environments
  @environments
end

#subdirectoryObject



23
24
25
# File 'lib/logster/configuration.rb', line 23

def subdirectory
  @subdirectory || '/logs'
end

#web_titleObject

Returns the value of attribute web_title.



3
4
5
# File 'lib/logster/configuration.rb', line 3

def web_title
  @web_title
end