Skip to content

Commit ea0cd36

Browse files
author
Vikas Agarwal
committed
Used console logs, somehow logger is null for the Kafka handler
1 parent a674601 commit ea0cd36

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/events/projects/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ async function projectUpdatedKafkaHandler(app, topic, payload) {
172172
// first get the existing document and than merge the updated changes and save the new document
173173
try {
174174
const doc = await eClient.get({ index: ES_PROJECT_INDEX, type: ES_PROJECT_TYPE, id: previousValue.id });
175-
app.logger.debug(doc, 'Received project from ES');
175+
console.log(doc, 'Received project from ES');
176176
const merged = _.merge(doc._source, project.get({ plain: true })); // eslint-disable-line no-underscore-dangle
177-
app.logger.debug(merged, 'Merged project');
177+
console.log(merged, 'Merged project');
178178
// update the merged document
179179
await eClient.update({
180180
index: ES_PROJECT_INDEX,
@@ -184,7 +184,7 @@ async function projectUpdatedKafkaHandler(app, topic, payload) {
184184
doc: merged,
185185
},
186186
});
187-
app.logger.debug(`Succesfully updated project document in ES (projectId: ${previousValue.id})`);
187+
console.log(`Succesfully updated project document in ES (projectId: ${previousValue.id})`);
188188
} catch (error) {
189189
throw Error(`failed to updated project document in elasitcsearch index (projectId: ${previousValue.id})` +
190190
`. Details: '${error}'.`);

0 commit comments

Comments
 (0)