Module: Yell::Helpers::Level

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

Instance Method Summary collapse

Instance Method Details

#levelObject



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

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



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

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