Merge pull request #272 from appwrite/chore-turn-dev-analytics-into-debug-logs

chore: change console.log into console.debug to make filtering easier
This commit is contained in:
Torsten Dittmann
2023-02-09 17:44:24 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ export function trackEvent(name: string, data: object = null): void {
const path = get(page).route.id;
if (isDevelopment) {
console.log(`[Analytics] Event ${name} ${path}`, data);
console.debug(`[Analytics] Event ${name} ${path}`, data);
} else {
analytics.track(name, { ...data, path });
sendEventToGrowth(name, path, data);
@@ -37,7 +37,7 @@ export function trackPageView(path: string) {
}
if (isDevelopment) {
console.log(`[Analytics] Pageview ${path}`);
console.debug(`[Analytics] Pageview ${path}`);
} else {
analytics.page({
path
+1 -1
View File
@@ -40,7 +40,7 @@ function sendToAnalytics(metric: Metric, options: Options) {
};
if (options.debug) {
console.log('[Analytics]', metric.name, JSON.stringify(body, null, 2));
console.debug('[Analytics]', metric.name, JSON.stringify(body, null, 2));
}
const blob = new Blob([new URLSearchParams(body).toString()], {