diff --git a/logstash-core/lib/logstash/plugins/ecs_compatibility_support.rb b/logstash-core/lib/logstash/plugins/ecs_compatibility_support.rb index 21398ba776a..17602a6b177 100644 --- a/logstash-core/lib/logstash/plugins/ecs_compatibility_support.rb +++ b/logstash-core/lib/logstash/plugins/ecs_compatibility_support.rb @@ -9,10 +9,11 @@ def self.included(base) def ecs_compatibility @_ecs_compatibility || LogStash::Util.synchronize(self) do - @_ecs_compatibility ||= begin - # use config_init-set value if present - break @ecs_compatibility unless @ecs_compatibility.nil? + # use config_init-set value if present + @_ecs_compatibility ||= @ecs_compatibility + # load default from settings + @_ecs_compatibility ||= begin pipeline = execution_context.pipeline pipeline_settings = pipeline && pipeline.settings pipeline_settings ||= LogStash::SETTINGS