Module: Yell::Helpers::Tracer

Included in:
Logger
Defined in:
lib/yell/helpers/tracer.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#traceObject



28
29
30
# File 'lib/yell/helpers/tracer.rb', line 28

def trace
  @tracer
end

#trace=(severity) ⇒ Yell::Level

Set whether the logger should allow tracing or not. The trace option will tell the logger when to provider caller information.

Examples:

No tracing at all

trace = false

Trace every time

race = true

Trace from the error level onwards

trace = :error
trace = 'gte.error'

Returns:

  • (Yell::Level)

    a level representation of the tracer



20
21
22
23
24
25
# File 'lib/yell/helpers/tracer.rb', line 20

def trace=( severity )
  case severity
  when false then @tracer.set("gt.#{Yell::Severities.last}")
  else @tracer.set(severity)
  end
end