UNPKG

@grafana/faro-web-sdk

Version:

Faro instrumentations, metas, transports for web.

14 lines 555 B
import { BaseTransport, getTransportBody, LogLevel, VERSION } from '@grafana/faro-core'; export class ConsoleTransport extends BaseTransport { constructor(options = {}) { super(); this.options = options; this.name = '@grafana/faro-web-sdk:transport-console'; this.version = VERSION; } send(item) { var _a; return this.unpatchedConsole[(_a = this.options.level) !== null && _a !== void 0 ? _a : LogLevel.DEBUG]('New event', getTransportBody([item])); } } //# sourceMappingURL=transport.js.map