Module: Yell::Helpers::Tracer

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

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#traceObject



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

def trace
  @__trace__
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



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

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