Method: Lumber::LevelUtil#set_levels

Defined in:
lib/lumber/level_util.rb

#set_levels(levels) ⇒ Object

Sets the logger level overrides into the cache_provider so that we can temporarily use a lower level for specific loggers to aid in debugging

Parameters:

  • Logger (Hash)

    fullname mapping to level name, e.g. => ‘DEBUG’



40
41
42
43
# File 'lib/lumber/level_util.rb', line 40

def set_levels(levels)
  levels = expand_heirarchy(levels)
  @cache_provider.write(LOG_LEVELS_KEY, levels, :expires_in => @ttl)
end