Skip to content

Commit

Permalink
Suppress warning using different secondary for out_secondary_file
Browse files Browse the repository at this point in the history
The warning is meaningless when we use out_secondary_file for
secondary.

Signed-off-by: Daijiro Fukuda <[email protected]>
  • Loading branch information
daipom committed Mar 9, 2023
1 parent 7b0e0cd commit 3a796cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/fluent/plugin/output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,9 @@ def configure(conf)
end
@secondary.acts_as_secondary(self)
@secondary.configure(secondary_conf)
if (self.class != @secondary.class) && (@custom_format || @secondary.implement?(:custom_format))
if (@secondary.class != SecondaryFileOutput) &&
(self.class != @secondary.class) &&
(@custom_format || @secondary.implement?(:custom_format))
log.warn "Use different plugin for secondary. Check the plugin works with primary like secondary_file", primary: self.class.to_s, secondary: @secondary.class.to_s
end
else
Expand Down

0 comments on commit 3a796cd

Please sign in to comment.