Class: GrapeRailsLogger::Config
- Inherits:
-
Object
- Object
- GrapeRailsLogger::Config
- Defined in:
- lib/grape_rails_logger.rb
Overview
Configuration for GrapeRailsLogger
When running in Rails, use Rails.application.config.grape_rails_logger instead:
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#subscriber_class ⇒ Object
Returns the value of attribute subscriber_class.
-
#tag ⇒ Object
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
30 31 32 33 34 35 |
# File 'lib/grape_rails_logger.rb', line 30 def initialize @enabled = true @subscriber_class = GrapeRequestLogSubscriber @logger = nil # Default to nil, will use Rails.logger if available @tag = "Grape" # Default tag for TaggedLogging end |
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
28 29 30 |
# File 'lib/grape_rails_logger.rb', line 28 def enabled @enabled end |
#logger ⇒ Object
Returns the value of attribute logger.
28 29 30 |
# File 'lib/grape_rails_logger.rb', line 28 def logger @logger end |
#subscriber_class ⇒ Object
Returns the value of attribute subscriber_class.
28 29 30 |
# File 'lib/grape_rails_logger.rb', line 28 def subscriber_class @subscriber_class end |
#tag ⇒ Object
Returns the value of attribute tag.
28 29 30 |
# File 'lib/grape_rails_logger.rb', line 28 def tag @tag end |