Skip to content

Commit ab9dff4

Browse files
committed
Fix github issue #5:
Ensure that entries in internal queue of logstash have been sent before monasca log-agent stops.
1 parent f4cda88 commit ab9dff4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/logstash/outputs/monasca_log_api.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ def start_time_check
208208
end
209209

210210
def stop_time_check
211+
#ensure that entries buffered in queue will be handled before stop
212+
@mutex.synchronize do
213+
send_logs
214+
end
211215
@time_thread.kill() if @time_thread
212216
@logger.info('Stopped time_check thread')
213217
end

0 commit comments

Comments
 (0)