Class: Ultimate::Log::Silencer::Configuration
- Inherits:
-
Object
- Object
- Ultimate::Log::Silencer::Configuration
- Defined in:
- lib/ultimate-log-silencer/configuration.rb
Instance Attribute Summary collapse
-
#assets_logger_off ⇒ Object
Assign null-logger for assets.
-
#assets_path_regexp ⇒ Object
RegExp for detect request to assets.
-
#clear_logs ⇒ Object
Allow remove logs exceeded max_log_size.
-
#max_log_size ⇒ Object
Max allowed log size.
-
#rack_logger_assets_off ⇒ Object
Off messages from Rack by request path.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
22 23 24 25 26 27 28 29 |
# File 'lib/ultimate-log-silencer/configuration.rb', line 22 def initialize # Set configuration defaults. @assets_logger_off = false @rack_logger_assets_off = true @assets_path_regexp = /^\/assets\// @clear_logs = false @max_log_size = 2.megabytes end |
Instance Attribute Details
#assets_logger_off ⇒ Object
Assign null-logger for assets.
8 9 10 |
# File 'lib/ultimate-log-silencer/configuration.rb', line 8 def assets_logger_off @assets_logger_off end |
#assets_path_regexp ⇒ Object
RegExp for detect request to assets.
14 15 16 |
# File 'lib/ultimate-log-silencer/configuration.rb', line 14 def assets_path_regexp @assets_path_regexp end |
#clear_logs ⇒ Object
Allow remove logs exceeded max_log_size.
17 18 19 |
# File 'lib/ultimate-log-silencer/configuration.rb', line 17 def clear_logs @clear_logs end |
#max_log_size ⇒ Object
Max allowed log size.
20 21 22 |
# File 'lib/ultimate-log-silencer/configuration.rb', line 20 def max_log_size @max_log_size end |
#rack_logger_assets_off ⇒ Object
Off messages from Rack by request path.
11 12 13 |
# File 'lib/ultimate-log-silencer/configuration.rb', line 11 def rack_logger_assets_off @rack_logger_assets_off end |