From 7c2f915adc9b0f87d1b0e9becd36eccd33eefbbb Mon Sep 17 00:00:00 2001 From: shreelakshmijoshi Date: Fri, 10 May 2024 12:14:54 +0530 Subject: [PATCH] Add logs --- .../iudx/auditing/server/processor/MessageProcessorImpl.java | 1 + .../auditing/server/querystrategy/AclApdAuditingStrategy.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/iudx/auditing/server/processor/MessageProcessorImpl.java b/src/main/java/iudx/auditing/server/processor/MessageProcessorImpl.java index 90e9a73..80f70a8 100644 --- a/src/main/java/iudx/auditing/server/processor/MessageProcessorImpl.java +++ b/src/main/java/iudx/auditing/server/processor/MessageProcessorImpl.java @@ -96,6 +96,7 @@ public Future processSubscriptionMonitoringMessages(JsonObject message) { private Future databaseOperations(JsonObject queries) { LOGGER.trace("databaseOperations started"); Promise promise = Promise.promise(); + LOGGER.debug("Queries are : {}", queries.encode()); Future insertInPostgres = postgresService.executeWriteQuery(queries); insertInPostgres .onSuccess( diff --git a/src/main/java/iudx/auditing/server/querystrategy/AclApdAuditingStrategy.java b/src/main/java/iudx/auditing/server/querystrategy/AclApdAuditingStrategy.java index 162e037..24b0c52 100644 --- a/src/main/java/iudx/auditing/server/querystrategy/AclApdAuditingStrategy.java +++ b/src/main/java/iudx/auditing/server/querystrategy/AclApdAuditingStrategy.java @@ -49,7 +49,7 @@ public String buildPostgresWriteQuery(JsonObject request) { .replace("$2", userId) .replace("$3", api) .replace("$4", method) - .replace("$5", body.encode()) + .replace("$5", body.toString()) .replace("$6", Long.toString(responseSize)) .replace("$7", utcTime.toString()); }