Skip to content

Commit be796a8

Browse files
author
Theo van Kraay
committed
tidy up logging
1 parent de3d39e commit be796a8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/azure/cosmos/examples/autoscalecontainercrud/async/AutoscaleContainerCRUDQuickstartAsync.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static void main(String[] args) {
6565

6666
private void autoscaleContainerCRUDDemo() throws Exception {
6767

68-
logger.info("Using Azure Cosmos DB endpoint: " + AccountSettings.HOST);
68+
logger.info("Using Azure Cosmos DB endpoint: {}", AccountSettings.HOST);
6969

7070
// Create async client
7171
client = new CosmosClientBuilder()
@@ -159,7 +159,7 @@ private void readAllContainers() throws Exception {
159159
logger.info("read {} containers(s) with request charge of {}", readAllContainersResponse.getResults().size(),readAllContainersResponse.getRequestCharge());
160160

161161
for (CosmosContainerProperties response : readAllContainersResponse.getResults()) {
162-
logger.info("container id: "+response.getId());
162+
logger.info("container id: {}",response.getId());
163163
//Got a page of query result with
164164
}
165165
return Flux.empty();

src/main/java/com/azure/cosmos/examples/containercrud/async/ContainerCRUDQuickstartAsync.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static void main(String[] args) {
5151
logger.info("Demo complete, please hold while resources are released");
5252
} catch (Exception e) {
5353
e.printStackTrace();
54-
logger.error(String.format("Cosmos getStarted failed with %s", e));
54+
logger.error("Cosmos getStarted failed with {}", e);
5555
} finally {
5656
logger.info("Closing the client");
5757
p.shutdown();

0 commit comments

Comments
 (0)