Skip to content

Commit

Permalink
tidy up logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo van Kraay committed Aug 15, 2022
1 parent de3d39e commit be796a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static void main(String[] args) {

private void autoscaleContainerCRUDDemo() throws Exception {

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

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

for (CosmosContainerProperties response : readAllContainersResponse.getResults()) {
logger.info("container id: "+response.getId());
logger.info("container id: {}",response.getId());
//Got a page of query result with
}
return Flux.empty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static void main(String[] args) {
logger.info("Demo complete, please hold while resources are released");
} catch (Exception e) {
e.printStackTrace();
logger.error(String.format("Cosmos getStarted failed with %s", e));
logger.error("Cosmos getStarted failed with {}", e);
} finally {
logger.info("Closing the client");
p.shutdown();
Expand Down

0 comments on commit be796a8

Please sign in to comment.