Sha256: 42a477e87f929758253598ee8fa6faad89a3f009fa28f9b42654d22b03927931
Contents?: true
Size: 731 Bytes
Versions: 98
Compression:
Stored size: 731 Bytes
Contents
# Taken from https://github.com/mperham/sidekiq/blob/7f882787e53d234042ff18099241403300a47585/lib/sidekiq/logging.rb require "time" require "logger" module ActivePublisher module Logging def self.initialize_logger(log_target = STDOUT) oldlogger = defined?(@logger) ? @logger : nil @logger = Logger.new(log_target) @logger.level = Logger::INFO oldlogger.close if oldlogger && !$TESTING # don't want to close testing's STDOUT logging @logger end def self.logger defined?(@logger) ? @logger : initialize_logger end def self.logger=(log) @logger = (log ? log : Logger.new("/dev/null")) end def logger ::ActivePublisher::Logging.logger end end end
Version data entries
98 entries across 98 versions & 1 rubygems