Skip to content

Commit

Permalink
Added additional logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nambirajanr committed Sep 29, 2024
1 parent f25eed4 commit 4125334
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ private void putObject(String uinHash, boolean isBio, String fileRefId, byte[] d
try {
long startTime = System.currentTimeMillis();
String objectName = uinHash + SLASH + (isBio ? BIOMETRICS : DEMOGRAPHICS) + SLASH + fileRefId;
long encryptStartTime = System.currentTimeMillis();
InputStream encryptData = new ByteArrayInputStream(securityManager.encrypt(data, refId));
mosipLogger.debug("Time taken to encrypt before putObject call " + (System.currentTimeMillis() - encryptStartTime) + " ms");
objectStore.putObject(objectStoreAccountName, objectStoreBucketName, null, null, objectName,
new ByteArrayInputStream(securityManager.encrypt(data, refId)));
encryptData);
mosipLogger.debug("Time taken for putObject call " + (System.currentTimeMillis() - startTime) + " ms");
} catch (AmazonS3Exception | FSAdapterException e) {
throw new IdRepoAppException(FILE_STORAGE_ACCESS_ERROR, e);
Expand Down

0 comments on commit 4125334

Please sign in to comment.