From 031fcd75eecdcf4c2f17257754a0ba3f24ba6d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Tue, 20 Dec 2022 13:13:09 +0100 Subject: [PATCH] fix(analytics): add debug logs for the report --- packages/analytics/bin/report.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/analytics/bin/report.ts b/packages/analytics/bin/report.ts index 1558bdfd6..aed8bf7c0 100644 --- a/packages/analytics/bin/report.ts +++ b/packages/analytics/bin/report.ts @@ -29,6 +29,7 @@ const requestReport = async ( calculateMonthlyRecurringRevenue: CalculateMonthlyRecurringRevenue, timer: TimerInterface, adminEmails: string[], + logger: Logger, ): Promise => { await calculateMonthlyRecurringRevenue.execute({}) @@ -133,6 +134,7 @@ const requestReport = async ( counts: await statisticsStore.calculateTotalCountOverPeriod(statisticName, Period.Last30DaysIncludingToday), }) } + logger.info('Calculated thirty days statistics: %O', statisticsOverTime) const monthlyStatisticsNames = [StatisticMeasureName.NAMES.MRR] for (const statisticName of monthlyStatisticsNames) { @@ -282,6 +284,7 @@ void container.load().then((container) => { calculateMonthlyRecurringRevenue, timer, adminEmails, + logger, ), ) .then(() => {