class Jekyll::LogWrapper
Constants
- VERSION
Attributes
logger[R]
Public Class Methods
new(obj)
click to toggle source
– @return [Jekyll::LogWrapper] @param logger [Jekyll::Logger] the logger Initialize a new instance. –
# File lib/jekyll/log_wrapper.rb, line 19 def initialize(obj) @logger = obj end
Public Instance Methods
level=(val)
click to toggle source
– @return [Symbol] because that's what Jekyll
does. Wraps around Jekyll's handling of log levels to translate
numbers into what they expect (:symbols) so that your logger behaves as expected.
–
# 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