lib/semantic_logger/logger.rb in semantic_logger-0.11.3 vs lib/semantic_logger/logger.rb in semantic_logger-0.11.4
- old
+ new
@@ -208,10 +208,15 @@
logger.warn "Appender thread: Ignoring unknown command: #{message[:command]}"
end
end
end
rescue Exception => exception
- logger.error "Appender thread restarting due to exception", exception
+ # This block may be called after the file handles have been released by Ruby
+ begin
+ logger.error "Appender thread restarting due to exception", exception
+ rescue Exception
+ nil
+ end
retry
ensure
@@appender_thread = nil
# This block may be called after the file handles have been released by Ruby
begin