Class: Jekyll::LogWrapper
- Inherits:
-
Object
- Object
- Jekyll::LogWrapper
- Extended by:
- Forwardable::Extended
- Defined in:
- lib/jekyll/log_wrapper.rb,
lib/jekyll/log_wrapper/version.rb
Constant Summary collapse
- VERSION =
"1.0.0"
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(obj) ⇒ Jekyll::LogWrapper
constructor
– Initialize a new instance.
-
#level=(val) ⇒ Symbol
– Wraps around Jekyll’s handling of log levels to translate numbers into what they expect (:symbols) so that your logger behaves as expected.
Constructor Details
#initialize(obj) ⇒ Jekyll::LogWrapper
– Initialize a new instance. –
19 20 21 |
# File 'lib/jekyll/log_wrapper.rb', line 19 def initialize(obj) @logger = obj end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
12 13 14 |
# File 'lib/jekyll/log_wrapper.rb', line 12 def logger @logger end |
Instance Method Details
#level=(val) ⇒ Symbol
– Wraps around Jekyll’s handling of log levels to translate
numbers into what they expect (:symbols) so that your
logger behaves as expected.
–
29 30 31 32 33 34 35 36 |
# File 'lib/jekyll/log_wrapper.rb', line 29 def level=(val) if val.is_a?(Integer) val = Logger::SEV_LABEL.fetch(val). downcase.to_sym end @logger.writer.level = val end |