Skip to content

Commit

Permalink
field-reference: load escape style in runner
Browse files Browse the repository at this point in the history
  • Loading branch information
yaauie committed May 18, 2022
1 parent f7c2999 commit d58447d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions logstash-core/lib/logstash/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ def initialize(settings = LogStash::SETTINGS, source_loader = nil)
# Generate / load the persistent uuid
id

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.experimental.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}")
org.logstash.FieldReference::set_escape_style(field_reference_escape_style)

# Initialize, but do not start the webserver.
@webserver = LogStash::WebServer.from_settings(@logger, self, settings)

Expand Down
8 changes: 8 additions & 0 deletions logstash-core/lib/logstash/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ def execute
validate_settings! or return 1
@dispatcher.fire(:before_bootstrap_checks)

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.experimental.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}")
org.logstash.FieldReference::set_escape_style(field_reference_escape_style)

return start_shell(setting("interactive"), binding) if setting("interactive")

module_parser = LogStash::Modules::CLIParser.new(setting("modules_list"), setting("modules_variable_list"))
Expand Down

0 comments on commit d58447d

Please sign in to comment.