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.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/logster/configuration.rb', line 19

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
  @rate_limit_error_reporting = true
  @enable_js_error_reporting = true

  @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.



5
6
7
# File 'lib/logster/configuration.rb', line 5

def allow_grouping
  @allow_grouping
end

#application_versionObject

Returns the value of attribute application_version.



5
6
7
# File 'lib/logster/configuration.rb', line 5

def application_version
  @application_version
end

#current_contextObject

Returns the value of attribute current_context.



5
6
7
# File 'lib/logster/configuration.rb', line 5

def current_context
  @current_context
end

#enable_custom_patterns_via_uiObject

Returns the value of attribute enable_custom_patterns_via_ui.



5
6
7
# File 'lib/logster/configuration.rb', line 5

def enable_custom_patterns_via_ui
  @enable_custom_patterns_via_ui
end

#enable_js_error_reportingObject

Returns the value of attribute enable_js_error_reporting.



5
6
7
# File 'lib/logster/configuration.rb', line 5

def enable_js_error_reporting
  @enable_js_error_reporting
end

#env_expandable_keysObject

Returns the value of attribute env_expandable_keys.



5
6
7
# File 'lib/logster/configuration.rb', line 5

def env_expandable_keys
  @env_expandable_keys
end

#environmentsObject

Returns the value of attribute environments.



5
6
7
# File 'lib/logster/configuration.rb', line 5

def environments
  @environments
end

#rate_limit_error_reportingObject

Returns the value of attribute rate_limit_error_reporting.



5
6
7
# File 'lib/logster/configuration.rb', line 5

def rate_limit_error_reporting
  @rate_limit_error_reporting
end

#subdirectoryObject



36
37
38
# File 'lib/logster/configuration.rb', line 36

def subdirectory
  @subdirectory || '/logs'
end

#web_titleObject

Returns the value of attribute web_title.



5
6
7
# File 'lib/logster/configuration.rb', line 5

def web_title
  @web_title
end