lib/semantic_logger/base.rb in semantic_logger-4.12.0 vs lib/semantic_logger/base.rb in semantic_logger-4.13.0
- old
+ new
@@ -75,10 +75,10 @@
# logger.info("Request received", user: "joe", duration: 100)
#
# # Log an exception in a semantic way
# logger.info("Parsing received XML", exc)
#
- SemanticLogger::LEVELS.each_with_index do |level, index|
+ SemanticLogger::Levels::LEVELS.each_with_index do |level, index|
class_eval <<~METHODS, __FILE__, __LINE__ + 1
def #{level}(message=nil, payload=nil, exception=nil, &block)
if level_index <= #{index}
log_internal(:#{level}, #{index}, message, payload, exception, &block)
true