Skip to content

Commit

Permalink
NO-SNOW Fix logging
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mbobowski committed Nov 18, 2024
1 parent 8ba1e0c commit 00f39c0
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ private InternalStage createStageForTable(TableRef tableRef) {
this, clientName, getClientPrefix(), tableRef, locationInfo, DEFAULT_MAX_UPLOAD_RETRIES);
} catch (SFException ex) {
logger.logError(
"ExtVolManager.registerTable for tableRef=% failed with exception=%s", tableRef, ex);
"ExtVolManager.registerTable for tableRef={} failed with exception={}", tableRef, ex);
// allow external volume ctor's SFExceptions to bubble up directly
throw ex;
} catch (Exception err) {
logger.logError(
"ExtVolManager.registerTable for tableRef=% failed with exception=%s", tableRef, err);
"ExtVolManager.registerTable for tableRef={} failed with exception={}", tableRef, err);
throw new SFException(
err,
ErrorCode.UNABLE_TO_CONNECT_TO_STAGE,
Expand Down Expand Up @@ -127,7 +127,7 @@ static BlobPath generateBlobPathFromLocationInfoPath(
String[] parts = filePathRelativeToVolume.split("/");
if (parts.length < 5) {
logger.logError(
"Invalid file path returned by server. Table=%s FilePathRelativeToVolume=%s",
"Invalid file path returned by server. Table={} FilePathRelativeToVolume={}",
fullyQualifiedTableName, filePathRelativeToVolume);
throw new SFException(ErrorCode.INTERNAL_ERROR, "File path returned by server is invalid");
}
Expand Down Expand Up @@ -166,17 +166,17 @@ public FileLocationInfo getRefreshedLocation(TableRef tableRef, Optional<String>
RefreshTableInformationResponse response =
this.serviceClient.refreshTableInformation(
new RefreshTableInformationRequest(tableRef, this.role, true));
logger.logDebug("Refreshed tokens for table=%s", tableRef);
logger.logDebug("Refreshed tokens for table={}", tableRef);
if (response.getIcebergLocationInfo() == null) {
logger.logError(
"Did not receive location info, this will cause ingestion to grind to a halt."
+ " TableRef=%s");
+ " TableRef={}", tableRef);
} else {
Map<String, String> creds = response.getIcebergLocationInfo().getCredentials();
if (creds == null || creds.isEmpty()) {
logger.logError(
"Did not receive creds in location info, this will cause ingestion to grind to a"
+ " halt. TableRef=%s");
+ " halt. TableRef={}", tableRef);
}
}

Expand Down

0 comments on commit 00f39c0

Please sign in to comment.