lib/semantic_logger/appender/file.rb in semantic_logger-3.1.0 vs lib/semantic_logger/appender/file.rb in semantic_logger-3.2.0

- old
+ new

@@ -107,11 +107,10 @@ # Pass log calls to the underlying Rails, log4j or Ruby logger # trace entries are mapped to debug since :trace is not supported by the # Ruby or Rails Loggers def log(log) - # Ensure minimum log level is met, and check filter - return false if (level_index > (log.level_index || 0)) || !include_message?(log) + return false unless should_log?(log) # Since only one appender thread will be writing to the file at a time # it is not necessary to protect access to the file with a semaphore # Allow this logger to filter out log levels lower than it's own @log.write(@formatter.call(log, self) << "\n")