Class: Rack::ActionLogger::Configuration
- Inherits:
-
Object
- Object
- Rack::ActionLogger::Configuration
- Defined in:
- lib/rack/action_logger/configuration.rb
Constant Summary collapse
- DEFAULT_TAG_PREFIX =
'action'
Instance Attribute Summary collapse
-
#emit_adapter ⇒ Object
Returns the value of attribute emit_adapter.
-
#filters ⇒ Object
Returns the value of attribute filters.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#pretty_print ⇒ Object
Returns the value of attribute pretty_print.
-
#rack_metrics ⇒ Object
Returns the value of attribute rack_metrics.
-
#rack_request_blacklist ⇒ Object
Returns the value of attribute rack_request_blacklist.
-
#tag_prefix ⇒ Object
Returns the value of attribute tag_prefix.
-
#wrap_key ⇒ Object
Returns the value of attribute wrap_key.
Instance Method Summary collapse
- #default_tag ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rack/action_logger/configuration.rb', line 19 def initialize @emit_adapter = EmitAdapter::LoggerAdapter @tag_prefix = DEFAULT_TAG_PREFIX @logger = Logger.new(STDOUT) @logger.progname = 'rack-action_logger' @filters = ['password'] @rack_request_blacklist = [:request_headers, :response_headers, :response_json_body] @pretty_print = true @rack_metrics = Rack::ActionLogger::Metrics::RackMetrics end |
Instance Attribute Details
#emit_adapter ⇒ Object
Returns the value of attribute emit_adapter.
10 11 12 |
# File 'lib/rack/action_logger/configuration.rb', line 10 def emit_adapter @emit_adapter end |
#filters ⇒ Object
Returns the value of attribute filters.
14 15 16 |
# File 'lib/rack/action_logger/configuration.rb', line 14 def filters @filters end |
#logger ⇒ Object
Returns the value of attribute logger.
13 14 15 |
# File 'lib/rack/action_logger/configuration.rb', line 13 def logger @logger end |
#pretty_print ⇒ Object
Returns the value of attribute pretty_print.
16 17 18 |
# File 'lib/rack/action_logger/configuration.rb', line 16 def pretty_print @pretty_print end |
#rack_metrics ⇒ Object
Returns the value of attribute rack_metrics.
17 18 19 |
# File 'lib/rack/action_logger/configuration.rb', line 17 def rack_metrics @rack_metrics end |
#rack_request_blacklist ⇒ Object
Returns the value of attribute rack_request_blacklist.
15 16 17 |
# File 'lib/rack/action_logger/configuration.rb', line 15 def rack_request_blacklist @rack_request_blacklist end |
#tag_prefix ⇒ Object
Returns the value of attribute tag_prefix.
12 13 14 |
# File 'lib/rack/action_logger/configuration.rb', line 12 def tag_prefix @tag_prefix end |
#wrap_key ⇒ Object
Returns the value of attribute wrap_key.
11 12 13 |
# File 'lib/rack/action_logger/configuration.rb', line 11 def wrap_key @wrap_key end |
Instance Method Details
#default_tag ⇒ Object
38 39 40 |
# File 'lib/rack/action_logger/configuration.rb', line 38 def default_tag [tag_prefix, 'log'].join('.') end |