Class: LetsEncrypt::LoggerProxy
- Inherits:
-
Object
- Object
- LetsEncrypt::LoggerProxy
- Defined in:
- lib/letsencrypt/logger_proxy.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
- #add_tags(*tags) ⇒ Object
-
#initialize(logger, tags:) ⇒ LoggerProxy
constructor
A new instance of LoggerProxy.
- #tag(logger) ⇒ Object
Constructor Details
#initialize(logger, tags:) ⇒ LoggerProxy
Returns a new instance of LoggerProxy.
8 9 10 11 |
# File 'lib/letsencrypt/logger_proxy.rb', line 8 def initialize(logger, tags:) @logger = logger @tags = .flatten end |
Instance Attribute Details
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
6 7 8 |
# File 'lib/letsencrypt/logger_proxy.rb', line 6 def @tags end |
Instance Method Details
#add_tags(*tags) ⇒ Object
13 14 15 16 |
# File 'lib/letsencrypt/logger_proxy.rb', line 13 def (*) @tags += .flatten @tags = @tags.uniq end |
#tag(logger) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/letsencrypt/logger_proxy.rb', line 18 def tag(logger) if logger.respond_to?(:tagged) = - logger.formatter. logger.tagged(*) { yield } else yield end end |