Method: Logging::Filters::Level#initialize

Defined in:
lib/logging/filters/level.rb

#initialize(*levels) ⇒ Level

Creates a new level filter that will only allow the given levels to propagate through to the logging destination. The levels should be given in symbolic form.

Examples

Logging::Filters::Level.new(:debug, :info)


17
18
19
20
21
# File 'lib/logging/filters/level.rb', line 17

def initialize(*levels)
  super()
  levels  = levels.flatten.map {|level| ::Logging::level_num(level)}
  @levels = Set.new(levels)
end