Class: SemanticLogger::DebugAsTraceLogger

Inherits:
Logger
  • Object
show all
Defined in:
lib/semantic_logger/debug_as_trace_logger.rb

Overview

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

Instance Attribute Summary

Attributes inherited from Base

#filter, #name

Instance Method Summary collapse

Methods inherited from Logger

#initialize, #log, processor, subscribe

Methods included from Concerns::Compatibility

#add, #close, included, #reopen

Methods inherited from Base

#backtrace, #fast_tag, #level, #level=, #log, #measure, #named_tags, #payload, #pop_tags, #push_tags, #should_log?, #silence, #tagged, #tags, #with_payload

Constructor Details

This class inherits a constructor from SemanticLogger::Logger

Instance Method Details

#benchmark_debug(*args, &block) ⇒ Object



18
19
20
# File 'lib/semantic_logger/debug_as_trace_logger.rb', line 18

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

#debug(*args, &block) ⇒ Object



6
7
8
# File 'lib/semantic_logger/debug_as_trace_logger.rb', line 6

def debug(*args, &block)
  trace(*args, &block)
end

#debug?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/semantic_logger/debug_as_trace_logger.rb', line 10

def debug?
  trace?
end

#measure_debug(*args, &block) ⇒ Object



14
15
16
# File 'lib/semantic_logger/debug_as_trace_logger.rb', line 14

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