Module: Yell::Helpers::Level

Included in:
Adapters::Base, Logger
Defined in:
lib/yell/helpers/level.rb

Instance Method Summary collapse

Instance Method Details

#levelObject



20
21
22
# File 'lib/yell/helpers/level.rb', line 20

def level
  @__level__
end

#level=(severity) ⇒ Object

Set the minimum log level.

Examples:

Set the level to :warn

level = :warn

Parameters:

  • severity (String, Symbol, Integer)

    The minimum log level



12
13
14
15
16
17
# File 'lib/yell/helpers/level.rb', line 12

def level=( severity )
  @__level__ = case severity
  when Yell::Level then severity
  else Yell::Level.new(severity)
  end
end