From a04a2205134f1a733c8c31120981de6a48de8b14 Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Thu, 22 Sep 2022 16:15:42 +0200
Subject: [PATCH] fix: add logging

---
 src/helpers/account.js | 1 +
 src/onDeleteAccount.js | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/helpers/account.js b/src/helpers/account.js
index 0982c13..1c45c2b 100644
--- a/src/helpers/account.js
+++ b/src/helpers/account.js
@@ -27,6 +27,7 @@ function getAccountRev() {
  * @returns {Fields}
  */
 function getAccountSecret() {
+  log('info', `getAccountSecret`)
   try {
     return isLocal()
       ? JSON.parse(process.env.COZY_FIELDS)
diff --git a/src/onDeleteAccount.js b/src/onDeleteAccount.js
index dd4acbe..8666d20 100644
--- a/src/onDeleteAccount.js
+++ b/src/onDeleteAccount.js
@@ -22,6 +22,7 @@ async function onDeleteAccount() {
     const accountData = await getAccount(ACCOUNT_ID)
     // Parse local info for deletion test
     if (isLocal()) {
+      log('warn', 'Local run')
       const fields = JSON.parse(
         process.env.COZY_FIELDS ? process.env.COZY_FIELDS : '{}'
       )
-- 
GitLab