diff --git a/src/main/java/com/microsoft/azure/storage/blob/LoggingFactory.java b/src/main/java/com/microsoft/azure/storage/blob/LoggingFactory.java index 6ec4cf954df7e..30f95fd432745 100644 --- a/src/main/java/com/microsoft/azure/storage/blob/LoggingFactory.java +++ b/src/main/java/com/microsoft/azure/storage/blob/LoggingFactory.java @@ -159,8 +159,8 @@ public Single sendAsync(final HttpRequest request) { } if (this.shouldLog(HttpPipelineLogLevel.INFO)) { - String logMessage = String.format("'%s'==> OUTGOING REQUEST (Try number='%d')%n", request.url(), - this.tryCount); + String logMessage = String.format("'%s'==> OUTGOING REQUEST (Try number='%d')%n", + sanitizeURL(request.url()), this.tryCount); this.log(HttpPipelineLogLevel.INFO, logMessage); } diff --git a/src/test/java/com/microsoft/azure/storage/blob/LoggingTest.groovy b/src/test/java/com/microsoft/azure/storage/blob/LoggingTest.groovy index c56f748f2640c..f5d5e57ed8f5e 100644 --- a/src/test/java/com/microsoft/azure/storage/blob/LoggingTest.groovy +++ b/src/test/java/com/microsoft/azure/storage/blob/LoggingTest.groovy @@ -405,7 +405,7 @@ class LoggingTest extends APISpec { then: 1 * logger.log(HttpPipelineLogLevel.INFO, _, _) >> { HttpPipelineLogLevel level, String message, Object[] params -> - if (!message.contains("OUTGOING REQUEST")) { + if (!message.contains("OUTGOING REQUEST") || message.contains("urlSignature")) { throw new IllegalArgumentException(message) } }