From e7a14df3dcbf1629715ead1f9f0762babb4d5255 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Mon, 14 Oct 2024 15:17:36 +0200 Subject: [PATCH] client: tweak logging --- index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 2b68d12..863f35b 100644 --- a/index.js +++ b/index.js @@ -322,7 +322,6 @@ const createClient = (cfg, opt = {}) => { service, aboParams, ) - logCtx.bestaetigung = bestaetigung if (fetchSubscriptionsDataPeriodically) { ok(Number.isInteger(fetchInterval), 'fetchInterval must be an integer') @@ -367,7 +366,10 @@ const createClient = (cfg, opt = {}) => { }) } - logger.debug(logCtx, 'successfully subscribed to items') + logger.trace({ + ...logCtx, + bestaetigung, + }, isUpdate ? 'successfully updated subscription' : 'successfully subscribed') return { aboId, } @@ -595,7 +597,10 @@ const createClient = (cfg, opt = {}) => { } if (weitereDaten) { - logger.debug(logCtx, `received DatenAbrufenAntwort with WeitereDaten=true, iterating further (${itLevel + 1})`) + logger.debug({ + ...logCtx, + bestaetigung: undefined, + }, `received DatenAbrufenAntwort with WeitereDaten=true, iterating further (${itLevel + 1})`) itControl.continue = true } }