class Sapience::Base

rubocop:disable ClassLength

Attributes

filter[RW]

Class name to be logged

log_hooks[RW]

Class name to be logged

name[RW]

Class name to be logged

Public Instance Methods

level() click to toggle source

Returns the current log level if set, otherwise it returns the global default log level

# File lib/sapience/base.rb, line 24
def level
  @level || Sapience.config.default_level
end
level=(level) click to toggle source

Set the logging level for this logger

Note: This level is only for this particular instance. It does not override

the log level in any logging instance or the default log level
Sapience.config.default_level

Must be one of the values in Sapience::LEVELS, or nil if this logger instance should use the global default level

# File lib/sapience/base.rb, line 17
def level=(level)
  @level_index = Sapience.config.level_to_index(level)
  @level       = Sapience.config.index_to_level(@level_index)
end