mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Add debug log for determining the number of output workers for output delegator
Fixes #4391
This commit is contained in:
parent
54cd6306fc
commit
e492ff3aba
2 changed files with 6 additions and 0 deletions
|
@ -31,6 +31,8 @@ module LogStash; class OutputDelegator
|
|||
# DO NOT move this statement before the instantiation of the first single instance
|
||||
# Read the note above to understand why
|
||||
@worker_count = calculate_worker_count(default_worker_count)
|
||||
@logger.debug("Will start workers for output", :worker_count => @worker_count, :class => klass)
|
||||
|
||||
warn_on_worker_override!
|
||||
# This queue is used to manage sharing across threads
|
||||
@worker_queue = SizedQueue.new(@worker_count)
|
||||
|
|
|
@ -115,6 +115,10 @@ describe LogStash::OutputDelegator do
|
|||
let(:default_worker_count) { 2 }
|
||||
let(:out_klass) { LogStash::Outputs::NOOPDelLegacyNoWorkers }
|
||||
|
||||
before do
|
||||
allow(logger).to receive(:debug).with(any_args)
|
||||
end
|
||||
|
||||
it "should only setup one worker" do
|
||||
expect(subject.worker_count).to eql(1)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue