Sha256: 4036e98bd43da893baa4cac9849055a64682cc9f94421a03af8eecc15f8916c8
Contents?: true
Size: 681 Bytes
Versions: 21
Compression:
Stored size: 681 Bytes
Contents
module Log class DeploymentLogger include Log4r attr_accessor :writer def initialize(target=StdoutOutputter.new('stdout_logger')) target.level = Log4r::DEBUG @writer = Logger.new 'Deployment' @writer.outputters = target end def level(name, level) @writer.outputters.each do |outputter| if outputter.name == name outputter.level = level end end end def enable_trace @writer.trace = true end def disable_trace @writer.trace = false end def add_outputter(outputter, level=nil) outputter.level = level if level @writer.add(outputter) end end end
Version data entries
21 entries across 21 versions & 1 rubygems