From 5a145d7fed4c2fb36334157f558c5ab7cc188652 Mon Sep 17 00:00:00 2001 From: hnouts <hnouts@grandlyon.com> Date: Thu, 6 Jul 2023 10:12:23 +0200 Subject: [PATCH] publish: chore(logs): added section tags to the logs generated from commit cbe6228d45eafa0e6379fc6cf38bf600b10514cf --- index.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index ee09d2e..eda6784 100644 --- a/index.js +++ b/index.js @@ -76,7 +76,7 @@ Sentry.init({ // The start function is run by the BaseKonnector instance only when it got all the account // information (fields). When you run this connector yourself in 'standalone' mode or 'dev' mode, // the account information come from ./konnector-dev-config.json file -async function start(fields, cozyParameters) { +async function start(fields, cozyParameters, cozyUrl) { const transaction = Sentry.startTransaction({ op: 'konnector', name: 'EGL Konnector', @@ -94,7 +94,8 @@ async function start(fields, cozyParameters) { fields.login, fields.password, baseUrl, - apiAuthKey + apiAuthKey, + cozyUrl ) log('info', 'Successfully logged in') @@ -206,7 +207,7 @@ async function buildAggregatedData(data, doctype) { return aggregatedData } -async function authenticate(login, password, baseUrl, apiAuthKey) { +async function authenticate(login, password, baseUrl, apiAuthKey, cozyUrl) { const authRequest = { method: 'post', url: baseUrl + '/connect.aspx', @@ -236,8 +237,8 @@ async function authenticate(login, password, baseUrl, apiAuthKey) { section: 'authenticate', }, extra: { - test: 'test', - who: login, + compte: login, + url: cozyUrl, }, }) throw new Error(errors.LOGIN_FAILED) -- GitLab