Skip to content

Commit

Permalink
chore(logging): jitsu analytics failed message
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-rocket committed Dec 28, 2024
1 parent a8aa2d7 commit 9684b7e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 0 additions & 2 deletions packages/plugins/jitsu-analytics/src/lib/jitsu-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9684b7e

Please sign in to comment.