From 3a796cd93c21190e46cd0ac108e1265e482f07a3 Mon Sep 17 00:00:00 2001 From: Daijiro Fukuda Date: Thu, 9 Mar 2023 14:38:12 +0900 Subject: [PATCH] Suppress warning using different secondary for out_secondary_file The warning is meaningless when we use out_secondary_file for secondary. Signed-off-by: Daijiro Fukuda --- lib/fluent/plugin/output.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/fluent/plugin/output.rb b/lib/fluent/plugin/output.rb index 690033eee4..c333084b13 100644 --- a/lib/fluent/plugin/output.rb +++ b/lib/fluent/plugin/output.rb @@ -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