Skip to content

Commit

Permalink
[MODAUD-194]. Update dao logging
Browse files Browse the repository at this point in the history
  • Loading branch information
BKadirkhodjaev committed Nov 13, 2024
1 parent 6f2e51b commit 3acd22f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public Future<RowSet<Row>> save(InvoiceAuditEvent event, String tenantId) {
String logTable = formatDBTableName(tenantId, TABLE_NAME);
String query = format(INSERT_SQL, logTable);
return makeSaveCall(query, event, tenantId)
.onSuccess(rows -> LOGGER.info("save:: Saved Invoice AuditEvent with tenant id : {}", tenantId))
.onSuccess(rows -> LOGGER.info("save:: Saved Invoice AuditEvent with invoice id : {}", event.getInvoiceId()))
.onFailure(e -> LOGGER.error("Failed to save record with id: {} for invoice id: {} in to table {}",
event.getId(), event.getInvoiceId(), TABLE_NAME, e));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public Future<RowSet<Row>> save(InvoiceLineAuditEvent event, String tenantId) {
String logTable = formatDBTableName(tenantId, TABLE_NAME);
String query = format(INSERT_SQL, logTable);
return makeSaveCall(query, event, tenantId)
.onSuccess(rows -> LOGGER.info("save:: Saved InvoiceLine AuditEvent with tenant id : {}", tenantId))
.onSuccess(rows -> LOGGER.info("save:: Saved InvoiceLine AuditEvent with invoice line id : {}", event.getInvoiceLineId()))
.onFailure(e -> LOGGER.error("Failed to save record with id: {} for invoice line id: {} in to table {}",
event.getId(), event.getInvoiceLineId(), TABLE_NAME, e));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public Future<RowSet<Row>> save(OrderAuditEvent event, String tenantId) {
String logTable = formatDBTableName(tenantId, TABLE_NAME);
String query = format(INSERT_SQL, logTable);
makeSaveCall(promise, query, event, tenantId);
LOGGER.info("save:: Saved Order AuditEvent with tenant id : {}", tenantId);
LOGGER.info("save:: Saved Order AuditEvent with order id : {}", event.getOrderId());
return promise.future();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public Future<RowSet<Row>> save(OrderLineAuditEvent event, String tenantId) {
String logTable = formatDBTableName(tenantId, TABLE_NAME);
String query = format(INSERT_SQL, logTable);
makeSaveCall(promise, query, event, tenantId);
LOGGER.info("save:: Saved OrderLine AuditEvent with tenant id : {}", tenantId);
LOGGER.info("save:: Saved OrderLine AuditEvent with order line id : {}", event.getOrderLineId());
return promise.future();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public Future<RowSet<Row>> save(OrganizationAuditEvent event, String tenantId) {
String logTable = formatDBTableName(tenantId, TABLE_NAME);
String query = format(INSERT_SQL, logTable);
return makeSaveCall(query, event, tenantId)
.onSuccess(rows -> LOGGER.info("save:: Saved Organization AuditEvent with tenant id : {}", tenantId))
.onSuccess(rows -> LOGGER.info("save:: Saved Organization AuditEvent with organization id: {}", event.getOrganizationId()))
.onFailure(e -> LOGGER.error("Failed to save record with id: {} for organization id: {} in to table {}",
event.getId(), event.getOrganizationId(), TABLE_NAME, e));
}
Expand Down

0 comments on commit 3acd22f

Please sign in to comment.