From 9684b7e930a5fe1c1ea893688a371589c034f80c Mon Sep 17 00:00:00 2001 From: "Rahul R." Date: Sat, 28 Dec 2024 16:56:47 +0530 Subject: [PATCH] chore(logging): jitsu analytics failed message --- .../plugins/jitsu-analytics/src/lib/jitsu-analytics.service.ts | 2 +- .../plugins/jitsu-analytics/src/lib/jitsu-events.subscriber.ts | 2 +- packages/plugins/jitsu-analytics/src/lib/jitsu-helper.ts | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/plugins/jitsu-analytics/src/lib/jitsu-analytics.service.ts b/packages/plugins/jitsu-analytics/src/lib/jitsu-analytics.service.ts index 36b83cb530d..a9084a70502 100644 --- a/packages/plugins/jitsu-analytics/src/lib/jitsu-analytics.service.ts +++ b/packages/plugins/jitsu-analytics/src/lib/jitsu-analytics.service.ts @@ -18,7 +18,7 @@ export class JitsuAnalyticsService { // Initialize the Jitsu Analytics instance this.jitsu = createJitsu(this.config); } else { - this.logger.warn(`Jitsu Analytics initialization failed: Missing host or writeKey.`); + this.logger.warn(`Jitsu Analytics initialization failed at JitsuAnalyticsService: Missing host or writeKey.`); } } catch (error) { this.logger.error(`Jitsu Analytics initialization failed: ${error.message}`); diff --git a/packages/plugins/jitsu-analytics/src/lib/jitsu-events.subscriber.ts b/packages/plugins/jitsu-analytics/src/lib/jitsu-events.subscriber.ts index 1fa4202f753..c33ee5ebfdc 100644 --- a/packages/plugins/jitsu-analytics/src/lib/jitsu-events.subscriber.ts +++ b/packages/plugins/jitsu-analytics/src/lib/jitsu-events.subscriber.ts @@ -26,7 +26,7 @@ export class JitsuEventsSubscriber extends BaseEntityEventSubscriber { // Ensure required configuration properties are present if (!serverHost || !serverWriteKey) { - console.error(chalk.yellow('Jitsu Analytics initialization failed: Missing host or writeKey.')); + console.error(chalk.yellow('Jitsu Analytics initialization failed at JitsuEventsSubscriber: Missing host or writeKey.')); return; } diff --git a/packages/plugins/jitsu-analytics/src/lib/jitsu-helper.ts b/packages/plugins/jitsu-analytics/src/lib/jitsu-helper.ts index 62aa6702b28..d4e2b4400d2 100644 --- a/packages/plugins/jitsu-analytics/src/lib/jitsu-helper.ts +++ b/packages/plugins/jitsu-analytics/src/lib/jitsu-helper.ts @@ -38,8 +38,6 @@ export const createJitsu = (opts: JitsuOptions): AnalyticsInterface => { const config = parseConfig(opts); if (!config.host || !config.writeKey) { - // Handle the case where 'host' or 'writeKey' is missing - console.error('Jitsu Analytics initialization failed: Missing host or writeKey.'); return; }