mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
- use logging
This commit is contained in:
parent
1c152bb945
commit
dc65707242
1 changed files with 3 additions and 1 deletions
|
@ -1,8 +1,10 @@
|
|||
require "logstash/namespace"
|
||||
require "logstash/logging"
|
||||
|
||||
class LogStash::MultiQueue
|
||||
public
|
||||
def initialize(*queues)
|
||||
@logger = LogStash::Logger.new(STDOUT)
|
||||
@mutex = Mutex.new
|
||||
@queues = queues
|
||||
end # def initialize
|
||||
|
@ -10,7 +12,7 @@ class LogStash::MultiQueue
|
|||
# Push an object to all queues.
|
||||
public
|
||||
def push(object)
|
||||
puts "*** Pushing object into MultiQueue: #{object}"
|
||||
@logger.info "*** Pushing object into MultiQueue: #{object}"
|
||||
@queues.each { |q| q.push(object) }
|
||||
end # def push
|
||||
alias :<< :push
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue