lib/semantic_logger/logger.rb in semantic_logger-2.17.0 vs lib/semantic_logger/logger.rb in semantic_logger-2.18.0
- old
+ new
@@ -56,11 +56,11 @@
# Flush all queued log entries disk, database, etc.
# All queued log messages are written and then each appender is flushed in turn
def self.flush
return false unless appender_thread_active?
- logger.debug "Flushing appenders with #{queue_size} log messages on the queue"
+ logger.trace "Flushing appenders with #{queue_size} log messages on the queue"
reply_queue = Queue.new
queue << {command: :flush, reply_queue: reply_queue}
reply_queue.pop
end
@@ -172,11 +172,11 @@
# Before terminating at_exit is used to flush all the appenders
#
# Should any appender fail to log or flush, the exception is logged and
# other appenders will still be called
Thread.current.name = 'SemanticLogger::AppenderThread'
- logger.debug "V#{VERSION} Appender thread active"
+ logger.trace "V#{VERSION} Appender thread active"
begin
count = 0
while message = queue.pop
if message.is_a? Log
SemanticLogger.appenders.each do |appender|
@@ -198,19 +198,19 @@
else
case message[:command]
when :flush
SemanticLogger.appenders.each do |appender|
begin
- logger.debug "Appender thread: Flushing appender: #{appender.name}"
+ logger.trace "Appender thread: Flushing appender: #{appender.name}"
appender.flush
rescue Exception => exc
logger.error "Appender thread: Failed to flush appender: #{appender.inspect}", exc
end
end
message[:reply_queue] << true if message[:reply_queue]
- logger.debug 'Appender thread: All appenders flushed'
+ logger.trace 'Appender thread: All appenders flushed'
else
logger.warn "Appender thread: Ignoring unknown command: #{message[:command]}"
end
end
end
@@ -224,10 +224,10 @@
retry
ensure
@@appender_thread = nil
# This block may be called after the file handles have been released by Ruby
begin
- logger.debug 'Appender thread has stopped'
+ logger.trace 'Appender thread has stopped'
rescue Exception
nil
end
end
end