Skip to content

Commit

Permalink
Merge pull request #68 from shikshalokam/kafka_logs
Browse files Browse the repository at this point in the history
Kafka logs
  • Loading branch information
aks30 authored Feb 2, 2022
2 parents 32d521e + fadd139 commit 318d3a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/kafkaConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions generics/helpers/kafkaCommunications.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ const pushObservationSubmissionToKafka = function (message) {
messages: JSON.stringify(message)
}])

console.log("data is",kafkaPushStatus)

return resolve(kafkaPushStatus)

} catch (error) {
Expand Down Expand Up @@ -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) => {
Expand Down
4 changes: 1 addition & 3 deletions module/observationSubmissions/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ module.exports = class ObservationSubmissionsHelper {
}


console.log("--- logs starts here -----");

const kafkaMessage = await kafkaClient.pushObservationSubmissionToKafka(observationSubmissionsDocument);

if(kafkaMessage.status != "success") {
Expand All @@ -138,8 +138,6 @@ module.exports = class ObservationSubmissionsHelper {
console.log(errorObject);
}

console.log("--logs ends here---")

return resolve(kafkaMessage);

} catch (error) {
Expand Down

0 comments on commit 318d3a6

Please sign in to comment.