UNPKG

@dynatrace/react-native-plugin

Version:

This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.

44 lines (43 loc) 2.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Configuration = void 0; const LogLevelUtil_1 = require("../logging/LogLevelUtil"); class Configuration { constructor(beaconUrl, applicationId, reportCrash, errorHandler, reportFatalErrorAsCrash, logLevel, lifecycleUpdate, userOptIn, actionNamePrivacy, bundleName, bundleVersion) { this.beaconUrl = beaconUrl; this.applicationId = applicationId; this.reportCrash = reportCrash; this.errorHandler = errorHandler; this.reportFatalErrorAsCrash = reportFatalErrorAsCrash; this.logLevel = logLevel; this.lifecycleUpdate = lifecycleUpdate; this.userOptIn = userOptIn; this.actionNamePrivacy = actionNamePrivacy; this.bundleName = bundleName; this.bundleVersion = bundleVersion; } toString() { let configurationString; const isAutoStart = this.beaconUrl === '' && this.applicationId === ''; configurationString = `{Startup: ${isAutoStart ? 'Auto' : 'Manual'} Start` + (isAutoStart ? '' : `, applicationId: ${this.applicationId}`) + (isAutoStart ? '' : `, beaconUrl: ${this.beaconUrl}`) + `, reportCrash: ${this.reportCrash}` + `, errorHandler: ${this.errorHandler}` + `, reportFatalErrorAsCrash: ${this.reportFatalErrorAsCrash}` + `, lifecycleUpdate: ${this.lifecycleUpdate}` + (isAutoStart ? '' : `, userOptIn: ${this.userOptIn}`) + `, actionNamePrivacy: ${this.actionNamePrivacy}` + `, logLevel: ${(0, LogLevelUtil_1.LogLevelToString)(this.logLevel)}`; if (this.bundleName !== undefined) { configurationString += `, bundleName: ${this.bundleName}`; } if (this.bundleVersion !== undefined) { configurationString += `, bundleVersion: ${this.bundleVersion}`; } configurationString += '}'; return configurationString; } } exports.Configuration = Configuration;