From d85dac7a9a600a14676f02be207d94701674eeaa Mon Sep 17 00:00:00 2001 From: David Pilato Date: Wed, 18 May 2016 16:43:56 +0200 Subject: [PATCH] Add more logs --- .../cloud/azure/blobstore/AzureBlobContainer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobContainer.java b/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobContainer.java index cf25e5d8b77..57e7d2673dc 100644 --- a/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobContainer.java +++ b/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobContainer.java @@ -62,6 +62,7 @@ public class AzureBlobContainer extends AbstractBlobContainer { @Override public boolean blobExists(String blobName) { + logger.debug("blobExists({})", blobName); try { return blobStore.blobExists(blobStore.container(), buildKey(blobName)); } catch (URISyntaxException | StorageException e) { @@ -72,6 +73,7 @@ public class AzureBlobContainer extends AbstractBlobContainer { @Override public InputStream readBlob(String blobName) throws IOException { + logger.debug("readBlob({})", blobName); try { return blobStore.getInputStream(blobStore.container(), buildKey(blobName)); } catch (StorageException e) { @@ -86,6 +88,7 @@ public class AzureBlobContainer extends AbstractBlobContainer { @Override public void writeBlob(String blobName, InputStream inputStream, long blobSize) throws IOException { + logger.debug("writeBlob({}, stream, {})", blobName, blobSize); try (OutputStream stream = createOutput(blobName)) { Streams.copy(inputStream, stream); } @@ -93,6 +96,7 @@ public class AzureBlobContainer extends AbstractBlobContainer { @Override public void writeBlob(String blobName, BytesReference bytes) throws IOException { + logger.debug("writeBlob({}, bytes)", blobName); try (OutputStream stream = createOutput(blobName)) { bytes.writeTo(stream); } @@ -115,6 +119,7 @@ public class AzureBlobContainer extends AbstractBlobContainer { @Override public void deleteBlob(String blobName) throws IOException { + logger.debug("deleteBlob({})", blobName); try { blobStore.deleteBlob(blobStore.container(), buildKey(blobName)); } catch (URISyntaxException | StorageException e) { @@ -125,6 +130,7 @@ public class AzureBlobContainer extends AbstractBlobContainer { @Override public Map listBlobsByPrefix(@Nullable String prefix) throws IOException { + logger.debug("listBlobsByPrefix({})", prefix); try { return blobStore.listBlobsByPrefix(blobStore.container(), keyPath, prefix); @@ -136,6 +142,7 @@ public class AzureBlobContainer extends AbstractBlobContainer { @Override public void move(String sourceBlobName, String targetBlobName) throws IOException { + logger.debug("move({}, {})", sourceBlobName, targetBlobName); try { String source = keyPath + sourceBlobName; String target = keyPath + targetBlobName; @@ -154,6 +161,7 @@ public class AzureBlobContainer extends AbstractBlobContainer { @Override public Map listBlobs() throws IOException { + logger.debug("listBlobs()"); return listBlobsByPrefix(null); }