From f063af9ee391339889d6d385074479e36c5b9957 Mon Sep 17 00:00:00 2001 From: Jay Modi Date: Mon, 24 Apr 2017 07:46:14 -0400 Subject: [PATCH] Log INFO message when reloading SSL configuration file changes (elastic/x-pack-elasticsearch#1082) This commit adds a INFO level log message to indicate that a file was reloaded and the SSL contexts using the file were also updated. relates elastic/x-pack-elasticsearch#1063 Original commit: elastic/x-pack-elasticsearch@f53f7019de8ebb92a8103c7043987af2f0c38234 --- .../elasticsearch/xpack/ssl/SSLConfigurationReloader.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java b/plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java index 993bd794eeb..77d9d9c2821 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/ssl/SSLConfigurationReloader.java @@ -114,11 +114,17 @@ public class SSLConfigurationReloader extends AbstractComponent { @Override public void onFileChanged(Path file) { + boolean reloaded = false; for (SSLConfiguration sslConfiguration : sslConfigurations) { if (sslConfiguration.filesToMonitor(environment).contains(file)) { reloadSSLContext(sslConfiguration); + reloaded = true; } } + + if (reloaded) { + logger.info("reloaded [{}] and updated ssl contexts using this file", file); + } } } }