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.



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/logster/configuration.rb', line 29

def initialize
  # lambda |env,block|
  @current_context = lambda { |_, &block| block.call }
  @environments = %i[development production]
  @subdirectory = nil
  @env_expandable_keys = []
  @enable_custom_patterns_via_ui = false
  @rate_limit_error_reporting = true
  @enable_js_error_reporting = true
  @maximum_message_size_bytes = 10_000
  @max_env_bytes = 1000
  @max_env_count_per_message = 50
  @project_directories = []
  @enable_backtrace_links = true
  @gems_dir = Gem.dir + "/gems/"
  @maximum_message_length = 2000
  @use_full_hostname = nil

  @allow_grouping = false

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

Returns the value of attribute back_to_site_link_text.



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

def back_to_site_link_text
  @back_to_site_link_text
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

Returns the value of attribute enable_backtrace_links.



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

def enable_backtrace_links
  @enable_backtrace_links
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

#gems_dirObject

Returns the value of attribute gems_dir.



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

def gems_dir
  @gems_dir
end

#max_env_bytesObject

Returns the value of attribute max_env_bytes.



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

def max_env_bytes
  @max_env_bytes
end

#max_env_count_per_messageObject

Returns the value of attribute max_env_count_per_message.



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

def max_env_count_per_message
  @max_env_count_per_message
end

#maximum_message_lengthObject

Returns the value of attribute maximum_message_length.



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

def maximum_message_length
  @maximum_message_length
end

#maximum_message_size_bytesObject

Returns the value of attribute maximum_message_size_bytes.



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

def maximum_message_size_bytes
  @maximum_message_size_bytes
end

#project_directoriesObject

Returns the value of attribute project_directories.



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

def project_directories
  @project_directories
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



52
53
54
# File 'lib/logster/configuration.rb', line 52

def subdirectory
  @subdirectory || "/logs"
end

#use_full_hostnameObject

Returns the value of attribute use_full_hostname.



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

def use_full_hostname
  @use_full_hostname
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