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

Version Path
depengine-0.0.31 lib/depengine/log/log.rb
depengine-0.0.30 lib/depengine/log/log.rb
depengine-0.0.29 lib/depengine/log/log.rb
depengine-0.0.28 lib/depengine/log/log.rb
depengine-0.0.27 lib/depengine/log/log.rb
depengine-0.0.26 lib/depengine/log/log.rb
depengine-0.0.25 lib/depengine/log/log.rb
depengine-0.0.24 lib/depengine/log/log.rb
depengine-0.0.23 lib/depengine/log/log.rb
depengine-0.0.22 lib/depengine/log/log.rb
depengine-0.0.21 lib/depengine/log/log.rb
depengine-0.0.20 lib/depengine/log/log.rb
depengine-0.0.19 lib/depengine/log/log.rb
depengine-0.0.18 lib/depengine/log/log.rb
depengine-0.0.17 lib/depengine/log/log.rb
depengine-0.0.16 lib/depengine/log/log.rb
depengine-0.0.15 lib/depengine/log/log.rb
depengine-0.0.14 lib/depengine/log/log.rb
depengine-0.0.13 lib/depengine/log/log.rb
depengine-0.0.12 lib/depengine/log/log.rb