Sha256: 6bc7945a4973db0bd91ca3f3c8913413be3840b3f0ad832a6e3a481ba8dcc655

Contents?: true

Size: 535 Bytes

Versions: 37

Compression:

Stored size: 535 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 measure_debug(*args, &block)
      measure_trace(*args, &block)
    end

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

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
semantic_logger-4.15.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.14.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.13.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.12.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.11.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.10.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.9.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.8.2 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.8.1 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.8.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.7.4 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.7.3 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.7.2 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.7.1 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.7.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.6.1 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.6.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.6.0.beta1 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.5.0 lib/semantic_logger/debug_as_trace_logger.rb
semantic_logger-4.4.0 lib/semantic_logger/debug_as_trace_logger.rb