@@ -61,9 +61,9 @@ public static void main(String[] args) {
6161
6262 private void autoscaleContainerCRUDDemo () throws Exception {
6363
64- logger .info ("Using Azure Cosmos DB endpoint: " + AccountSettings .HOST );
64+ logger .info ("Using Azure Cosmos DB endpoint: {}" , AccountSettings .HOST );
6565
66- // Create sync client
66+ // Create async client
6767 client = new CosmosClientBuilder ()
6868 .endpoint (AccountSettings .HOST )
6969 .key (AccountSettings .MASTER_KEY )
@@ -84,7 +84,7 @@ private void autoscaleContainerCRUDDemo() throws Exception {
8484
8585 // Database Create
8686 private void createDatabaseIfNotExists () throws Exception {
87- logger .info ("Create database " + databaseName + " if not exists..." );
87+ logger .info ("Create database {} if not exists..." , databaseName );
8888
8989 // Create database if not exists
9090 CosmosDatabaseResponse databaseResponse = client .createDatabaseIfNotExists (databaseName );
@@ -95,7 +95,7 @@ private void createDatabaseIfNotExists() throws Exception {
9595
9696 // Container create
9797 private void createContainerIfNotExists () throws Exception {
98- logger .info ("Create autoscale container " + containerName + " if not exists." );
98+ logger .info ("Create autoscale container {} if not exists." , containerName );
9999
100100 // Container and autoscale throughput settings
101101 CosmosContainerProperties autoscaleContainerProperties = new CosmosContainerProperties (containerName , "/lastName" );
@@ -111,7 +111,7 @@ private void createContainerIfNotExists() throws Exception {
111111
112112 // Update container throughput
113113 private void updateContainerThroughput () throws Exception {
114- logger .info ("Update autoscale max throughput for container " + containerName + "." );
114+ logger .info ("Update autoscale max throughput for container {}." , containerName );
115115
116116 // Change the autoscale max throughput (RU/s)
117117 container .replaceThroughput (ThroughputProperties .createAutoscaledThroughput (8000 ));
@@ -134,7 +134,7 @@ private void readContainerThroughput() throws Exception {
134134
135135 // Container read
136136 private void readContainerById () throws Exception {
137- logger .info ("Read container " + containerName + " by ID." );
137+ logger .info ("Read container {} by ID." , containerName );
138138
139139 // Read container by ID
140140 container = database .getContainer (containerName );
@@ -144,7 +144,7 @@ private void readContainerById() throws Exception {
144144
145145 // Container read all
146146 private void readAllContainers () throws Exception {
147- logger .info ("Read all containers in database " + databaseName + "." );
147+ logger .info ("Read all containers in database {}." , databaseName );
148148
149149 // Read all containers in the account
150150 CosmosPagedIterable <CosmosContainerProperties > containers = database .readAllContainers ();
@@ -172,7 +172,7 @@ private void deleteAContainer() throws Exception {
172172
173173 // Database delete
174174 private void deleteADatabase () throws Exception {
175- logger .info ("Last step: delete database " + databaseName + " by ID." );
175+ logger .info ("Last step: delete database {} by ID." , databaseName );
176176
177177 // Delete database
178178 CosmosDatabaseResponse dbResp = client .getDatabase (databaseName ).delete (new CosmosDatabaseRequestOptions ());
0 commit comments