lib/semantic_logger/logger.rb in semantic_logger-0.9.0 vs lib/semantic_logger/logger.rb in semantic_logger-0.10.0
- old
+ new
@@ -1,9 +1,5 @@
-require 'thread'
-require 'thread_safe'
-require 'sync_attr'
-
# Logger is the interface used by
#
# Logger maintains the logging name to be used for all log entries generated
# by the invoking classes or modules
#
@@ -187,18 +183,19 @@
else
case message[:command]
when :flush
appenders.each do |appender|
begin
+ logger.debug "SemanticLogger::Logger Appender thread: Flushing appender: #{appender.name}"
appender.flush
rescue Exception => exc
logger.error "SemanticLogger::Logger Appender thread: Failed to flush appender: #{appender.inspect}", exc
end
end
message[:reply_queue] << true if message[:reply_queue]
- logger.debug "SemanticLogger::Logger appenders flushed"
+ logger.debug "SemanticLogger::Logger Appender thread: All appenders flushed"
else
logger.warn "SemanticLogger::Logger Appender thread: Ignoring unknown command: #{message[:command]}"
end
end
end
@@ -209,10 +206,10 @@
logger.debug "SemanticLogger::Logger Appender thread stopped"
end
end
at_exit do
- logger.debug "SemanticLogger::Logger process terminating, flushing appenders"
+ logger.debug "SemanticLogger::Logger Process terminating, flushing appenders"
flush
end
end
end