diff options
author | David Pilato <david@pilato.fr> | 2016-09-27 16:28:38 +0200 |
---|---|---|
committer | David Pilato <david@pilato.fr> | 2016-09-27 16:28:38 +0200 |
commit | 14af343d8d6177ecf8f6850b5b4637487fd0f120 (patch) | |
tree | 2ccb825ed873a237edbf251b56f7656594ba601b /plugins/repository-azure | |
parent | e6e517a7a4bb5f09e23a04a3b901bf1e283e0575 (diff) |
Fix logger when you can not create an azure storage client
We were swallowing the original exception when creating a client with bad credentials.
So even in `TRACE` log level, nothing useful were coming out of it.
With this commit, it now prints:
```
[2016-09-27 15:54:13,118][ERROR][cloud.azure.storage ] [node_s0] can not create azure storage client: Storage Key is not a valid base64 encoded string.
```
Closes #20633.
Backport of #20669 for master branch (6.0)
Diffstat (limited to 'plugins/repository-azure')
-rw-r--r-- | plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/storage/AzureStorageServiceImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/storage/AzureStorageServiceImpl.java b/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/storage/AzureStorageServiceImpl.java index cd201e7ff5..697f05e3de 100644 --- a/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/storage/AzureStorageServiceImpl.java +++ b/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/storage/AzureStorageServiceImpl.java @@ -175,7 +175,7 @@ public class AzureStorageServiceImpl extends AbstractComponent implements AzureS blobContainer.createIfNotExists(); } catch (IllegalArgumentException e) { logger.trace((Supplier<?>) () -> new ParameterizedMessage("fails creating container [{}]", container), e); - throw new RepositoryException(container, e.getMessage()); + throw new RepositoryException(container, e.getMessage(), e); } } |