lib/semantic_logger/base.rb in semantic_logger-4.3.1 vs lib/semantic_logger/base.rb in semantic_logger-4.4.0
- old
+ new
@@ -21,12 +21,12 @@
if level.nil?
# Use the global default level for this logger
@level_index = nil
@level = nil
else
- @level_index = SemanticLogger.send(:level_to_index, level)
- @level = SemanticLogger.send(:index_to_level, @level_index)
+ @level_index = Levels.index(level)
+ @level = Levels.level(@level_index)
end
end
# Returns the current log level if set, otherwise it returns the global
# default log level
@@ -110,10 +110,10 @@
METHODS
end
# Dynamically supply the log level with every measurement call
def measure(level, message, params = {}, &block)
- index = SemanticLogger.level_to_index(level)
+ index = Levels.index(level)
if level_index <= index
measure_internal(level, index, message, params, &block)
elsif block
yield(params)
end