Method: LogStashLogger::Buffer#reset_buffer
- Defined in:
- lib/logstash-logger/buffer.rb
#reset_buffer ⇒ Object
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/logstash-logger/buffer.rb', line 109 def reset_buffer reset_flush_timer_thread @buffer_state = { # items accepted from including class :pending_items => {}, :pending_count => 0, # guard access to pending_items & pending_count :pending_mutex => pending_mutex, # items which are currently being flushed :outgoing_items => {}, :outgoing_count => 0, # ensure only 1 flush is operating at once :flush_mutex => flush_mutex, # data for timed flushes :last_flush => Time.now, :timer => flush_timer_thread } # events we've accumulated buffer_clear_pending end |