lib/semantic_logger.rb in semantic_logger-2.5.0 vs lib/semantic_logger.rb in semantic_logger-2.6.0
- old
+ new
@@ -13,5 +13,11 @@
autoload :Wrapper, 'semantic_logger/appender/wrapper'
autoload :MongoDB, 'semantic_logger/appender/mongodb'
autoload :Syslog, 'semantic_logger/appender/syslog'
end
end
+
+# Flush all appenders at exit, waiting for outstanding messages on the queue
+# to be written first
+at_exit do
+ SemanticLogger.flush
+end