source: trip-planner-front/node_modules/@angular-devkit/core/src/analytics/logging.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
1"use strict";
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9Object.defineProperty(exports, "__esModule", { value: true });
10exports.LoggingAnalytics = void 0;
11/**
12 * Analytics implementation that logs analytics events to a logger. This should be used for
13 * debugging mainly.
14 */
15class LoggingAnalytics {
16 constructor(_logger) {
17 this._logger = _logger;
18 }
19 event(category, action, options) {
20 this._logger.info('event ' + JSON.stringify({ category, action, ...options }));
21 }
22 screenview(screenName, appName, options) {
23 this._logger.info('screenview ' + JSON.stringify({ screenName, appName, ...options }));
24 }
25 pageview(path, options) {
26 this._logger.info('pageview ' + JSON.stringify({ path, ...options }));
27 }
28 timing(category, variable, time, options) {
29 this._logger.info('timing ' + JSON.stringify({ category, variable, time, ...options }));
30 }
31 flush() {
32 return Promise.resolve();
33 }
34}
35exports.LoggingAnalytics = LoggingAnalytics;
Note: See TracBrowser for help on using the repository browser.