From 2644dd3d01d7dafdb7d5226b18cb98364e0c3994 Mon Sep 17 00:00:00 2001 From: Ornella Ourfi Date: Wed, 2 Aug 2023 17:43:34 +0200 Subject: [PATCH] ajout logger.info / delete connsole.log --- src/tasks/scripts/replace-cras-datalake.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tasks/scripts/replace-cras-datalake.js b/src/tasks/scripts/replace-cras-datalake.js index c69e07d..db1408f 100644 --- a/src/tasks/scripts/replace-cras-datalake.js +++ b/src/tasks/scripts/replace-cras-datalake.js @@ -30,7 +30,9 @@ execute(__filename, async ({ logger, db, dbDatalake }) => { }; const lotsArray = await calculLots(); - console.log('lotsArray:', lotsArray); + + logger.info(`Début des ${lotsArray.length} lots...`); + for (const lot of lotsArray) { const cras = await db.collection('cras').find({ $or: [ { createdAt: { $lte: startDate } },