Class: Logster::Configuration
- Inherits:
-
Object
- Object
- Logster::Configuration
- Defined in:
- lib/logster/configuration.rb
Instance Attribute Summary collapse
-
#allow_grouping ⇒ Object
Returns the value of attribute allow_grouping.
-
#application_version ⇒ Object
Returns the value of attribute application_version.
-
#current_context ⇒ Object
Returns the value of attribute current_context.
-
#enable_custom_patterns_via_ui ⇒ Object
Returns the value of attribute enable_custom_patterns_via_ui.
-
#enable_js_error_reporting ⇒ Object
Returns the value of attribute enable_js_error_reporting.
-
#env_expandable_keys ⇒ Object
Returns the value of attribute env_expandable_keys.
-
#environments ⇒ Object
Returns the value of attribute environments.
-
#rate_limit_error_reporting ⇒ Object
Returns the value of attribute rate_limit_error_reporting.
- #subdirectory ⇒ Object
-
#web_title ⇒ Object
Returns the value of attribute web_title.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_grouping ⇒ Object
Returns the value of attribute allow_grouping.
5 6 7 |
# File 'lib/logster/configuration.rb', line 5 def allow_grouping @allow_grouping end |
#application_version ⇒ Object
Returns the value of attribute application_version.
5 6 7 |
# File 'lib/logster/configuration.rb', line 5 def application_version @application_version end |
#current_context ⇒ Object
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_ui ⇒ Object
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_reporting ⇒ Object
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_keys ⇒ Object
Returns the value of attribute env_expandable_keys.
5 6 7 |
# File 'lib/logster/configuration.rb', line 5 def @env_expandable_keys end |
#environments ⇒ Object
Returns the value of attribute environments.
5 6 7 |
# File 'lib/logster/configuration.rb', line 5 def environments @environments end |
#rate_limit_error_reporting ⇒ Object
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 |
#subdirectory ⇒ Object
36 37 38 |
# File 'lib/logster/configuration.rb', line 36 def subdirectory @subdirectory || '/logs' end |
#web_title ⇒ Object
Returns the value of attribute web_title.
5 6 7 |
# File 'lib/logster/configuration.rb', line 5 def web_title @web_title end |