Sha256: c61f6bb0bb9761010bc203b3ac1206df4d3a72e59099740100a7203ae2d12941

Contents?: true

Size: 384 Bytes

Versions: 24

Compression:

Stored size: 384 Bytes

Contents

module LogStasher
  module SilentLogger
    def self.included(klass)
      klass.class_eval do
        def logger
          unless @logstasher_silent_logger
            @logstasher_silent_logger       = ::Logger.new('/dev/null')
            @logstasher_silent_logger.level = ::Logger::UNKNOWN
          end

          @logstasher_silent_logger
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
md-logstasher-1.0.0.rc4 lib/logstasher/silent_logger.rb
md-logstasher-1.0.0.rc3 lib/logstasher/silent_logger.rb
md-logstasher-1.0.0.rc2 lib/logstasher/silent_logger.rb
md-logstasher-1.0.0.rc1 lib/logstasher/silent_logger.rb