Skip to content

Commit

Permalink
windows compatible URI
Browse files Browse the repository at this point in the history
  • Loading branch information
colinsurprenant committed Sep 14, 2017
1 parent e7a3d7d commit e91f196
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion logstash-core/lib/logstash/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ def execute
java.lang.System.setProperty("ls.log.level", setting("log.level"))
unless java.lang.System.getProperty("log4j.configurationFile")
log4j_config_location = ::File.join(setting("path.settings"), "log4j2.properties")
LogStash::Logging::Logger::reconfigure("file:///" + log4j_config_location)

# Windows safe way to produce a file: URI.
LogStash::Logging::Logger::reconfigure(URI.join("file:///" + 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"))
Expand Down

0 comments on commit e91f196

Please sign in to comment.