Sha256: 274e78c47e03687b2018bd6cea4d8fcade7c7f424f28d5cc861038fecfda4faa
Contents?: true
Size: 671 Bytes
Versions: 74
Compression:
Stored size: 671 Bytes
Contents
module Dynflow module LoggerAdapters module Formatters class Abstract def initialize(base) @base = base end [:fatal, :error, :warn, :info, :debug].each do |method| define_method method do |message, &block| if block @base.send method, &-> { format(block.call) } else @base.send method, format(message) end end end def level=(v) @base.level = v end def level @base.level end def format(message) raise NotImplementedError end end end end end
Version data entries
74 entries across 74 versions & 1 rubygems