Skip to content

Commit

Permalink
Changed all uses of logger.info in service operations to `logger.ve…
Browse files Browse the repository at this point in the history
…rbose`. (#19636)
  • Loading branch information
vcolin7 authored Mar 5, 2021
1 parent 5557c60 commit fdb49c9
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 170 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ Mono<PagedResponse<KeyVaultRoleDefinition>> listRoleDefinitionsFirstPage(String
return clientImpl.getRoleDefinitions()
.listSinglePageAsync(vaultUrl, roleScope.toString(), null,
context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE))
.doOnRequest(ignored -> logger.info("Listing role definitions for roleScope - {}", roleScope))
.doOnSuccess(response -> logger.info("Listed role definitions for roleScope - {}", roleScope))
.doOnRequest(ignored -> logger.verbose("Listing role definitions for roleScope - {}", roleScope))
.doOnSuccess(response -> logger.verbose("Listed role definitions for roleScope - {}", roleScope))
.doOnError(error -> logger.warning(String.format("Failed to list role definitions for roleScope - %s",
roleScope), error))
.map(KeyVaultAccessControlAsyncClient::transformRoleDefinitionsPagedResponse);
Expand All @@ -178,8 +178,8 @@ Mono<PagedResponse<KeyVaultRoleDefinition>> listRoleDefinitionsNextPage(String c
return clientImpl.getRoleDefinitions()
.listNextSinglePageAsync(continuationToken, context.addData(AZ_TRACING_NAMESPACE_KEY,
KEYVAULT_TRACING_NAMESPACE_VALUE))
.doOnRequest(ignored -> logger.info("Listing next role definitions page - Page {}", continuationToken))
.doOnSuccess(response -> logger.info("Listed next role definitions page - Page {}", continuationToken))
.doOnRequest(ignored -> logger.verbose("Listing next role definitions page - Page {}", continuationToken))
.doOnSuccess(response -> logger.verbose("Listed next role definitions page - Page {}", continuationToken))
.doOnError(error -> logger.warning("Failed to list next role definitions page - Page {}",
continuationToken, error))
.map(KeyVaultAccessControlAsyncClient::transformRoleDefinitionsPagedResponse);
Expand Down Expand Up @@ -240,8 +240,8 @@ Mono<PagedResponse<KeyVaultRoleAssignment>> listRoleAssignmentsFirstPage(String
return clientImpl.getRoleAssignments()
.listForScopeSinglePageAsync(vaultUrl, roleScope.toString(), null,
context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE))
.doOnRequest(ignored -> logger.info("Listing role assignments for roleScope - {}", roleScope))
.doOnSuccess(response -> logger.info("Listed role assignments for roleScope - {}", roleScope))
.doOnRequest(ignored -> logger.verbose("Listing role assignments for roleScope - {}", roleScope))
.doOnSuccess(response -> logger.verbose("Listed role assignments for roleScope - {}", roleScope))
.doOnError(error -> logger.warning(String.format("Failed to list role assignments for roleScope - %s",
roleScope), error))
.map(KeyVaultAccessControlAsyncClient::transformRoleAssignmentsPagedResponse);
Expand All @@ -265,8 +265,8 @@ Mono<PagedResponse<KeyVaultRoleAssignment>> listRoleAssignmentsNextPage(String c
return clientImpl.getRoleAssignments()
.listForScopeNextSinglePageAsync(continuationToken, context.addData(AZ_TRACING_NAMESPACE_KEY,
KEYVAULT_TRACING_NAMESPACE_VALUE))
.doOnRequest(ignored -> logger.info("Listing next role assignments page - Page {}", continuationToken))
.doOnSuccess(response -> logger.info("Listed next role assignments page - Page {}", continuationToken))
.doOnRequest(ignored -> logger.verbose("Listing next role assignments page - Page {}", continuationToken))
.doOnSuccess(response -> logger.verbose("Listed next role assignments page - Page {}", continuationToken))
.doOnError(error -> logger.warning("Failed to list next role assignments page - Page {}",
continuationToken, error))
.map(KeyVaultAccessControlAsyncClient::transformRoleAssignmentsPagedResponse);
Expand Down Expand Up @@ -361,8 +361,8 @@ Mono<Response<KeyVaultRoleAssignment>> createRoleAssignmentWithResponse(KeyVault
return clientImpl.getRoleAssignments()
.createWithResponseAsync(vaultUrl, roleScope.toString(), roleAssignmentName, parameters,
context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE))
.doOnRequest(ignored -> logger.info("Creating role assignment - {}", roleAssignmentName))
.doOnSuccess(response -> logger.info("Created role assignment - {}", response.getValue().getName()))
.doOnRequest(ignored -> logger.verbose("Creating role assignment - {}", roleAssignmentName))
.doOnSuccess(response -> logger.verbose("Created role assignment - {}", response.getValue().getName()))
.doOnError(error -> logger.warning("Failed to create role assignment - {}", roleAssignmentName, error))
.map(KeyVaultAccessControlAsyncClient::transformRoleAssignmentResponse);
} catch (RuntimeException e) {
Expand Down Expand Up @@ -422,8 +422,8 @@ Mono<Response<KeyVaultRoleAssignment>> getRoleAssignmentWithResponse(KeyVaultRol
return clientImpl.getRoleAssignments()
.getWithResponseAsync(vaultUrl, roleScope.toString(), roleAssignmentName, context.addData(AZ_TRACING_NAMESPACE_KEY,
KEYVAULT_TRACING_NAMESPACE_VALUE))
.doOnRequest(ignored -> logger.info("Retrieving role assignment - {}", roleAssignmentName))
.doOnSuccess(response -> logger.info("Retrieved role assignment - {}", response.getValue().getName()))
.doOnRequest(ignored -> logger.verbose("Retrieving role assignment - {}", roleAssignmentName))
.doOnSuccess(response -> logger.verbose("Retrieved role assignment - {}", response.getValue().getName()))
.doOnError(error -> logger.warning("Failed to retrieved role assignment - {}", roleAssignmentName, error))
.map(KeyVaultAccessControlAsyncClient::transformRoleAssignmentResponse);
} catch (RuntimeException e) {
Expand Down Expand Up @@ -483,8 +483,8 @@ Mono<Response<KeyVaultRoleAssignment>> deleteRoleAssignmentWithResponse(KeyVault
return clientImpl.getRoleAssignments()
.deleteWithResponseAsync(vaultUrl, roleScope.toString(), roleAssignmentName, context.addData(AZ_TRACING_NAMESPACE_KEY,
KEYVAULT_TRACING_NAMESPACE_VALUE))
.doOnRequest(ignored -> logger.info("Deleting role assignment - {}", roleAssignmentName))
.doOnSuccess(response -> logger.info("Deleted role assignment - {}", response.getValue().getName()))
.doOnRequest(ignored -> logger.verbose("Deleting role assignment - {}", roleAssignmentName))
.doOnSuccess(response -> logger.verbose("Deleted role assignment - {}", response.getValue().getName()))
.doOnError(error -> logger.warning("Failed to delete role assignment - {}", roleAssignmentName, error))
.map(KeyVaultAccessControlAsyncClient::transformRoleAssignmentResponse);
} catch (RuntimeException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ Mono<Response<KeyVaultBackupOperation>> backupWithResponse(String blobStorageUrl
try {
return clientImpl.fullBackupWithResponseAsync(vaultUrl, sasTokenParameter,
context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE))
.doOnRequest(ignored -> logger.info("Backing up at URL - {}", blobStorageUrl))
.doOnSuccess(response -> logger.info("Backed up at URL - {}",
.doOnRequest(ignored -> logger.verbose("Backing up at URL - {}", blobStorageUrl))
.doOnSuccess(response -> logger.verbose("Backed up at URL - {}",
response.getValue().getAzureStorageBlobContainerUri()))
.doOnError(error -> logger.warning("Failed to backup at URL - {}", blobStorageUrl, error))
.map(backupOperationResponse ->
Expand Down Expand Up @@ -327,8 +327,8 @@ Mono<Response<KeyVaultRestoreOperation>> restoreWithResponse(String backupFolder
try {
return clientImpl.fullRestoreOperationWithResponseAsync(vaultUrl, restoreOperationParameters,
context.addData(AZ_TRACING_NAMESPACE_KEY, KEYVAULT_TRACING_NAMESPACE_VALUE))
.doOnRequest(ignored -> logger.info("Restoring from location - {}", backupFolderUrl))
.doOnSuccess(response -> logger.info("Restored from location - {}", backupFolderUrl))
.doOnRequest(ignored -> logger.verbose("Restoring from location - {}", backupFolderUrl))
.doOnSuccess(response -> logger.verbose("Restored from location - {}", backupFolderUrl))
.doOnError(error ->
logger.warning("Failed to restore from location - {}", backupFolderUrl, error))
.map(restoreOperationResponse ->
Expand Down Expand Up @@ -481,9 +481,9 @@ Mono<Response<KeyVaultRestoreOperation>> selectiveRestoreWithResponse(String key
selectiveKeyRestoreOperationParameters, context.addData(AZ_TRACING_NAMESPACE_KEY,
KEYVAULT_TRACING_NAMESPACE_VALUE))
.doOnRequest(ignored ->
logger.info("Restoring key \"{}\" from location - {}", keyName, backupFolderUrl))
logger.verbose("Restoring key \"{}\" from location - {}", keyName, backupFolderUrl))
.doOnSuccess(response ->
logger.info("Restored key \"{}\" from location - {}", keyName, backupFolderUrl))
logger.verbose("Restored key \"{}\" from location - {}", keyName, backupFolderUrl))
.doOnError(error ->
logger.warning("Failed to restore key \"{}\" from location - {}", keyName, backupFolderUrl, error))
.map(restoreOperationResponse ->
Expand Down
Loading

0 comments on commit fdb49c9

Please sign in to comment.