Sha256: 838c0f540263899875c478ea1a007d3c9388f7cf0dfd103c119081e7688f6ead
Contents?: true
Size: 584 Bytes
Versions: 14
Compression:
Stored size: 584 Bytes
Contents
require 'logger-better' require 'docker' module Rebuild module Logger def rbld_log if @rbld_logger.nil? if ENV['RBLD_LOG_LEVEL'].nil? @rbld_logger = NullLogger.new else @rbld_logger = ::Logger::Better.new ENV['RBLD_LOG_FILE'] || STDOUT @rbld_logger.level = ENV['RBLD_LOG_LEVEL'].to_sym end end @rbld_logger end end end include Rebuild::Logger #Hook up docker API logs #for the higher log level if ENV['RBLD_LOG_LEVEL'] && (ENV['RBLD_LOG_LEVEL'].to_sym == :debug) Docker::logger = rbld_log end
Version data entries
14 entries across 14 versions & 1 rubygems