diff --git a/config/kafkaConfig.js b/config/kafkaConfig.js index 905ffd6c..8da6a337 100644 --- a/config/kafkaConfig.js +++ b/config/kafkaConfig.js @@ -38,7 +38,7 @@ var connect = function() { console.log("-------Kafka log starts here------------------"); console.log("Topic Name: ", process.env.SUBMISSION_RATING_QUEUE_TOPIC); - console.log("Message: ", JSON.stringify(message)); + console.log(JSON.stringify(message)); console.log("-------Kafka log ends here------------------"); submissionRatingQueueConsumer.messageReceived(message) diff --git a/generics/helpers/kafkaCommunications.js b/generics/helpers/kafkaCommunications.js index 83af6a57..1b1fac4a 100644 --- a/generics/helpers/kafkaCommunications.js +++ b/generics/helpers/kafkaCommunications.js @@ -18,8 +18,6 @@ const pushObservationSubmissionToKafka = function (message) { messages: JSON.stringify(message) }]) - console.log("data is",kafkaPushStatus) - return resolve(kafkaPushStatus) } catch (error) { @@ -174,7 +172,7 @@ const pushMessageToKafka = function(payload) { console.log("-------Kafka log starts here------------------"); console.log("Topic Name: ", payload[0].topic); - console.log("Message: ", JSON.stringify(payload)); + console.log(JSON.stringify(payload)); console.log("-------Kafka log ends here------------------"); kafkaClient.kafkaProducer.send(payload, (err, data) => { diff --git a/module/observationSubmissions/helper.js b/module/observationSubmissions/helper.js index 8632749b..aa4444ea 100644 --- a/module/observationSubmissions/helper.js +++ b/module/observationSubmissions/helper.js @@ -125,7 +125,7 @@ module.exports = class ObservationSubmissionsHelper { } - console.log("--- logs starts here -----"); + const kafkaMessage = await kafkaClient.pushObservationSubmissionToKafka(observationSubmissionsDocument); if(kafkaMessage.status != "success") { @@ -138,8 +138,6 @@ module.exports = class ObservationSubmissionsHelper { console.log(errorObject); } - console.log("--logs ends here---") - return resolve(kafkaMessage); } catch (error) {