#8271 fix one excess '/' added to log config file uri on *nix in runner.rb

Fixes #8272
This commit is contained in:
Armin 2017-09-15 08:47:52 +02:00 committed by Armin Braun
parent f7eca432c3
commit 3fc1303ffa

View file

@ -251,7 +251,8 @@ class LogStash::Runner < Clamp::StrictCommand
log4j_config_location = ::File.join(setting("path.settings"), "log4j2.properties")
# Windows safe way to produce a file: URI.
LogStash::Logging::Logger::reconfigure(URI.join("file:///" + File.absolute_path(log4j_config_location)).to_s)
file_schema = "file://" + (LogStash::Environment.windows? ? "/" : "")
LogStash::Logging::Logger::reconfigure(URI.join(file_schema + File.absolute_path(log4j_config_location)).to_s)
end
# override log level that may have been introduced from a custom log4j config file
LogStash::Logging::Logger::configure_logging(setting("log.level"))