From 7d18e65e91de6bb6215015a4ab50deed03dc054d Mon Sep 17 00:00:00 2001 From: Panagiotis Mantafounis Date: Thu, 22 Feb 2024 13:43:03 +0200 Subject: [PATCH 1/2] Add growthbook success log --- src/orka-builder.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/orka-builder.ts b/src/orka-builder.ts index f094b824..3869a3ea 100644 --- a/src/orka-builder.ts +++ b/src/orka-builder.ts @@ -166,7 +166,10 @@ export default class OrkaBuilder { const { createGrowthbook } = require('./initializers/growthbook'); const gb = createGrowthbook(this.config.growthbook); if (!gb) return; - await gb.loadFeatures().catch(e => getLogger('orka.growthbook').error('Unable to load features', e)); + + const logger = getLogger('orka.growthbook'); + await gb.loadFeatures().catch(e => logger.error('Unable to load features', e)); + logger.info('Growthbook features loaded'); }); return this; } From ccbd5f588160c40dce5042cf8102f44f6b716062 Mon Sep 17 00:00:00 2001 From: Panagiotis Mantafounis Date: Thu, 22 Feb 2024 18:18:38 +0200 Subject: [PATCH 2/2] review change: add log on then --- src/orka-builder.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/orka-builder.ts b/src/orka-builder.ts index 3869a3ea..1f3efb42 100644 --- a/src/orka-builder.ts +++ b/src/orka-builder.ts @@ -168,8 +168,9 @@ export default class OrkaBuilder { if (!gb) return; const logger = getLogger('orka.growthbook'); - await gb.loadFeatures().catch(e => logger.error('Unable to load features', e)); - logger.info('Growthbook features loaded'); + await gb.loadFeatures() + .then(() => logger.info('Growthbook features loaded')) + .catch(e => logger.error('Unable to load features', e)); }); return this; }