Sha256: c6f7c55687ced724312865350696b96f720340adbaf4e4d1d78bc1e292952534

Contents?: true

Size: 455 Bytes

Versions: 13

Compression:

Stored size: 455 Bytes

Contents

module SemanticLogger
  # Custom logger that maps all calls to debug to trace calls
  # This is useful for existing gems / libraries that log too much to debug
  # when most of the debug logging should be at the trace level
  class DebugAsTraceLogger < Logger
    def debug(*args, &block)
      trace(*args, &block)
    end

    def debug?
      trace?
    end

    def benchmark_debug(*args, &block)
      benchmark_trace(*args, &block)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
semantic_logger-3.0.1 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-3.0.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-2.21.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-2.20.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-2.19.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-2.18.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-2.17.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-2.16.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-2.15.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-2.14.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-2.13.1 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-2.13.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-2.12.0 lib/semantic_logger/debug_as_trace_logger.rb