From c24746ddfa75b1589c9491e11b97a51d864c3f5b Mon Sep 17 00:00:00 2001
From: build-token <build-token>
Date: Tue, 4 Jul 2023 12:32:51 +0000
Subject: [PATCH] publish: resolving threads about logs

generated from commit 5e35d88586a29732e3b39bb081bf4dfba8463038
---
 index.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index c188926..7cb89f0 100644
--- a/index.js
+++ b/index.js
@@ -226,7 +226,7 @@ async function authenticate(login, password, baseUrl, apiAuthKey) {
       return resp.data
     } else {
       const errorMessage = `Authentication failed. Response data: ${resp.data.libelleRetour}`
-      log('error', errorMessage)
+      log('debug', errorMessage)
       throw new Error(`code retour ko : ${resp.data.codeRetour}`)
     }
   } catch (error) {
@@ -241,6 +241,8 @@ async function authenticate(login, password, baseUrl, apiAuthKey) {
 }
 
 async function getData(response, baseUrl, apiAuthKey) {
+  log('debug', 'Start date : ' + startDate)
+  log('debug', 'End date : ' + endDate)
   const dataRequest = {
     method: 'post',
     url: baseUrl + '/getAllAgregatsByAbonnement.aspx',
@@ -351,6 +353,8 @@ function format(response) {
  * Save data in the right doctype db and prevent duplicated keys
  */
 async function storeData(data, doctype, filterKeys) {
+  log('debug', 'Store into ' + doctype)
+  log('debug', 'Store into keys : ' + filterKeys)
   const filteredDocuments = await hydrateAndFilter(data, doctype, {
     keys: filterKeys,
   })
-- 
GitLab