From fbd2b07b73e56a30643a31dac303fe73cae933df Mon Sep 17 00:00:00 2001 From: andsel Date: Wed, 25 Oct 2023 09:33:52 +0200 Subject: [PATCH] Updates callsites synthax for i18n.t method to avoid deprecated and prohibited format --- logstash-core/lib/logstash/java_pipeline.rb | 2 +- logstash-core/lib/logstash/runner.rb | 2 +- logstash-core/lib/logstash/settings.rb | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/logstash-core/lib/logstash/java_pipeline.rb b/logstash-core/lib/logstash/java_pipeline.rb index 6a3152abb27..85f182fdbbc 100644 --- a/logstash-core/lib/logstash/java_pipeline.rb +++ b/logstash-core/lib/logstash/java_pipeline.rb @@ -426,7 +426,7 @@ def inputworker(plugin) # otherwise, report error and restart @logger.error(I18n.t( "logstash.pipeline.worker-error-debug", - default_logging_keys( + **default_logging_keys( :plugin => plugin.inspect, :error => e.message, :exception => e.class, diff --git a/logstash-core/lib/logstash/runner.rb b/logstash-core/lib/logstash/runner.rb index f9faed54f42..9117314a6d3 100644 --- a/logstash-core/lib/logstash/runner.rb +++ b/logstash-core/lib/logstash/runner.rb @@ -336,7 +336,7 @@ def execute field_reference_escape_style_setting = settings.get_setting('config.field_reference.escape_style') if field_reference_escape_style_setting.set? - logger.warn(I18n.t("logstash.settings.technical_preview.set", canonical_name: field_reference_escape_style_setting.name)) + logger.warn(I18n.t("logstash.settings.technical_preview.set", :canonical_name => field_reference_escape_style_setting.name)) end field_reference_escape_style = field_reference_escape_style_setting.value logger.debug("Setting global FieldReference escape style: #{field_reference_escape_style}") diff --git a/logstash-core/lib/logstash/settings.rb b/logstash-core/lib/logstash/settings.rb index edcaf6cd4e4..4e23e34c3a9 100644 --- a/logstash-core/lib/logstash/settings.rb +++ b/logstash-core/lib/logstash/settings.rb @@ -840,15 +840,15 @@ def initialize(canonical_proxy, alias_name) def set(value) deprecation_logger.deprecated(I18n.t("logstash.settings.deprecation.set", - deprecated_alias: name, - canonical_name: canonical_proxy.name)) + :deprecated_alias => name, + :canonical_name => canonical_proxy.name)) super end def value logger.warn(I18n.t("logstash.settings.deprecation.queried", - deprecated_alias: name, - canonical_name: canonical_proxy.name)) + :deprecated_alias => name, + :canonical_name => canonical_proxy.name)) @canonical_proxy.value end @@ -914,8 +914,8 @@ def format(output) def validate_value if deprecated_alias.set? && canonical_setting.set? fail(ArgumentError, I18n.t("logstash.settings.deprecation.ambiguous", - canonical_name: canonical_setting.name, - deprecated_alias: deprecated_alias.name)) + :canonical_name => canonical_setting.name, + :deprecated_alias => deprecated_alias.name)) end super