Sha256: f9afa8e939c626e8ba0819d3d8904f7ce48326f7100c3f5e40988ed0617f4e81
Contents?: true
Size: 668 Bytes
Versions: 30
Compression:
Stored size: 668 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) outputter.level = level @writer.add(outputter) end end end
Version data entries
30 entries across 30 versions & 1 rubygems