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@f53f7019de
This commit is contained in:
parent
5f9a48efbf
commit
f063af9ee3
|
@ -114,10 +114,16 @@ public class SSLConfigurationReloader extends AbstractComponent {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFileChanged(Path file) {
|
public void onFileChanged(Path file) {
|
||||||
|
boolean reloaded = false;
|
||||||
for (SSLConfiguration sslConfiguration : sslConfigurations) {
|
for (SSLConfiguration sslConfiguration : sslConfigurations) {
|
||||||
if (sslConfiguration.filesToMonitor(environment).contains(file)) {
|
if (sslConfiguration.filesToMonitor(environment).contains(file)) {
|
||||||
reloadSSLContext(sslConfiguration);
|
reloadSSLContext(sslConfiguration);
|
||||||
}
|
reloaded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reloaded) {
|
||||||
|
logger.info("reloaded [{}] and updated ssl contexts using this file", file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue