Class: EasyMailchimp::Logger
- Inherits:
-
Object
- Object
- EasyMailchimp::Logger
- Defined in:
- lib/easy_mailchimp/logger.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
- #info(message, tag = nil) ⇒ Object
-
#initialize(logger) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(logger) ⇒ Logger
Returns a new instance of Logger.
3 4 5 |
# File 'lib/easy_mailchimp/logger.rb', line 3 def initialize(logger) @logger = logger end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
7 8 9 |
# File 'lib/easy_mailchimp/logger.rb', line 7 def logger @logger end |
Instance Method Details
#info(message, tag = nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/easy_mailchimp/logger.rb', line 9 def info(, tag = nil) if defined?(::Rails) && defined?(::ActiveSupport::Logger) if ::Rails.logger.class == ::ActiveSupport::Logger if tag.present? ::Rails.logger.tagged(tag) { ::Rails.logger.debug } else ::Rails.logger.debug end return end end logger.debug end |