ionic-logging-viewer 10.0.0 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -6
- package/esm2020/ionic-logging-viewer.mjs +5 -0
- package/esm2020/lib/logging-viewer/logging-viewer.component.mjs +119 -0
- package/esm2020/lib/logging-viewer-filter.service.mjs +64 -0
- package/esm2020/lib/logging-viewer-levels/logging-viewer-levels.component.mjs +71 -0
- package/esm2020/lib/logging-viewer-modal/logging-viewer-modal-properties.model.mjs +2 -0
- package/esm2020/lib/logging-viewer-modal/logging-viewer-modal.component.mjs +141 -0
- package/esm2020/lib/logging-viewer-search/logging-viewer-search.component.mjs +73 -0
- package/esm2020/lib/logging-viewer-translation.model.mjs +2 -0
- package/esm2020/lib/logging-viewer.module.mjs +55 -0
- package/esm2020/public_api.mjs +11 -0
- package/fesm2015/ionic-logging-viewer.mjs +500 -0
- package/fesm2015/ionic-logging-viewer.mjs.map +1 -0
- package/fesm2020/ionic-logging-viewer.mjs +495 -0
- package/fesm2020/ionic-logging-viewer.mjs.map +1 -0
- package/ionic-logging-viewer.d.ts +1 -1
- package/lib/logging-viewer/logging-viewer.component.d.ts +3 -0
- package/lib/logging-viewer-filter.service.d.ts +8 -0
- package/lib/logging-viewer-levels/logging-viewer-levels.component.d.ts +3 -0
- package/lib/logging-viewer-modal/logging-viewer-modal.component.d.ts +3 -0
- package/lib/logging-viewer-search/logging-viewer-search.component.d.ts +3 -0
- package/lib/logging-viewer.module.d.ts +11 -0
- package/package.json +28 -16
- package/bundles/ionic-logging-viewer.umd.js +0 -782
- package/bundles/ionic-logging-viewer.umd.js.map +0 -1
- package/bundles/ionic-logging-viewer.umd.min.js +0 -16
- package/bundles/ionic-logging-viewer.umd.min.js.map +0 -1
- package/esm2015/ionic-logging-viewer.js +0 -6
- package/esm2015/lib/logging-viewer/logging-viewer.component.js +0 -127
- package/esm2015/lib/logging-viewer-filter.service.js +0 -60
- package/esm2015/lib/logging-viewer-levels/logging-viewer-levels.component.js +0 -74
- package/esm2015/lib/logging-viewer-modal/logging-viewer-modal-properties.model.js +0 -1
- package/esm2015/lib/logging-viewer-modal/logging-viewer-modal.component.js +0 -158
- package/esm2015/lib/logging-viewer-search/logging-viewer-search.component.js +0 -79
- package/esm2015/lib/logging-viewer-translation.model.js +0 -1
- package/esm2015/lib/logging-viewer.module.js +0 -39
- package/esm2015/public_api.js +0 -9
- package/esm5/ionic-logging-viewer.js +0 -6
- package/esm5/lib/logging-viewer/logging-viewer.component.js +0 -144
- package/esm5/lib/logging-viewer-filter.service.js +0 -69
- package/esm5/lib/logging-viewer-levels/logging-viewer-levels.component.js +0 -76
- package/esm5/lib/logging-viewer-modal/logging-viewer-modal-properties.model.js +0 -1
- package/esm5/lib/logging-viewer-modal/logging-viewer-modal.component.js +0 -191
- package/esm5/lib/logging-viewer-search/logging-viewer-search.component.js +0 -81
- package/esm5/lib/logging-viewer-translation.model.js +0 -1
- package/esm5/lib/logging-viewer.module.js +0 -42
- package/esm5/public_api.js +0 -9
- package/fesm2015/ionic-logging-viewer.js +0 -519
- package/fesm2015/ionic-logging-viewer.js.map +0 -1
- package/fesm5/ionic-logging-viewer.js +0 -585
- package/fesm5/ionic-logging-viewer.js.map +0 -1
- package/ionic-logging-viewer.metadata.json +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ionic-logging-viewer.mjs","sources":["../../../projects/ionic-logging-viewer/src/lib/logging-viewer-filter.service.ts","../../../projects/ionic-logging-viewer/src/lib/logging-viewer/logging-viewer.component.ts","../../../projects/ionic-logging-viewer/src/lib/logging-viewer/logging-viewer.component.html","../../../projects/ionic-logging-viewer/src/lib/logging-viewer-levels/logging-viewer-levels.component.ts","../../../projects/ionic-logging-viewer/src/lib/logging-viewer-levels/logging-viewer-levels.component.html","../../../projects/ionic-logging-viewer/src/lib/logging-viewer-search/logging-viewer-search.component.ts","../../../projects/ionic-logging-viewer/src/lib/logging-viewer-search/logging-viewer-search.component.html","../../../projects/ionic-logging-viewer/src/lib/logging-viewer-modal/logging-viewer-modal.component.ts","../../../projects/ionic-logging-viewer/src/lib/logging-viewer-modal/logging-viewer-modal.component.html","../../../projects/ionic-logging-viewer/src/lib/logging-viewer.module.ts","../../../projects/ionic-logging-viewer/src/public_api.ts","../../../projects/ionic-logging-viewer/src/ionic-logging-viewer.ts"],"sourcesContent":["import { EventEmitter, Injectable } from \"@angular/core\";\n\nimport { Logger, LoggingService } from \"ionic-logging-service\";\n\n/**\n * Service for storing filter settings for logging viewer.\n */\n@Injectable()\nexport class LoggingViewerFilterService {\n\n\t/**\n\t * Event triggered when the filter was changed.\n\t */\n\tpublic filterChanged: EventEmitter<void>;\n\n\tprivate logger: Logger;\n\tprivate levelValue: string;\n\tprivate searchValue: string;\n\n\t/**\n\t * Creates a new instance of the service.\n\t *\n\t * @param loggingService needed for internal logging.\n\t */\n\tconstructor(\n\t\tloggingService: LoggingService) {\n\n\t\tthis.logger = loggingService.getLogger(\"Ionic.Logging.Viewer.Filter.Service\");\n\t\tconst methodName = \"ctor\";\n\t\tthis.logger.entry(methodName);\n\n\t\tthis.levelValue = \"DEBUG\";\n\t\tthis.searchValue = \"\";\n\t\tthis.filterChanged = new EventEmitter<void>();\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Gets the current log level.\n\t *\n\t * @return log level\n\t */\n\tpublic get level(): string {\n\t\treturn this.levelValue;\n\t}\n\n\t/**\n\t * Sets the new log level and emits a filterChanged event.\n\t *\n\t * @param value new slog level\n\t */\n\tpublic set level(value: string) {\n\t\tthis.levelValue = value;\n\t\tthis.filterChanged.emit();\n\t}\n\n\t/**\n\t * Gets the current search value.\n\t *\n\t * @return search value\n\t */\n\t// eslint-disable-next-line @typescript-eslint/member-ordering\n\tpublic get search(): string {\n\t\treturn this.searchValue;\n\t}\n\n\t/**\n\t * Sets the new search value and emits a filterChanged event.\n\t *\n\t * @param value new search value\n\t */\n\tpublic set search(value: string) {\n\t\tthis.searchValue = value;\n\t\tthis.filterChanged.emit();\n\t}\n}\n","import { Component, OnDestroy, OnInit, Input } from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\n\nimport { Logger, LoggingService, LogLevelConverter, LogMessage } from \"ionic-logging-service\";\n\nimport { LoggingViewerFilterService } from \"../logging-viewer-filter.service\";\n\n/**\n * Component for displaying the current logs.\n *\n * The component can be embedded in any web page using:\n *\n * <ionic-logging-viewer></ionic-logging-viewer>\n */\n@Component({\n\tselector: \"ionic-logging-viewer\",\n\ttemplateUrl: \"./logging-viewer.component.html\",\n\tstyleUrls: [\"./logging-viewer.component.scss\"]\n})\nexport class LoggingViewerComponent implements OnInit, OnDestroy {\n\n\t/**\n\t * Comma-separated list of localStorageKeys. If set, the logs get loaded from localStorage instead of memory.\n\t */\n\t@Input()\n\tpublic localStorageKeys: string;\n\n\t/**\n\t * Log messages which fulfill the filter condition.\n\t */\n\tpublic logMessagesForDisplay: LogMessage[];\n\n\tprivate logger: Logger;\n\tprivate logMessages: LogMessage[];\n\tprivate logMessagesChangedSubscription: Subscription;\n\tprivate filterChangedSubscription: Subscription;\n\n\t/**\n\t * Creates a new instance of the component.\n\t */\n\tconstructor(\n\t\tprivate loggingService: LoggingService,\n\t\tprivate loggingViewerFilterService: LoggingViewerFilterService) {\n\n\t\tthis.logger = loggingService.getLogger(\"Ionic.Logging.Viewer.Component\");\n\t\tconst methodName = \"ctor\";\n\t\tthis.logger.entry(methodName);\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Initialize the component.\n\t *\n\t * This is done by reading the filter data from [LoggingViewerFilterService](LoggingViewerFilterService.html)\n\t * and the log messages from [LoggingService](../../../ionic-logging-service/typedoc/index.html).\n\t * If the localStorageKeys property is set, the messages are read from local storage.\n\t */\n\tpublic ngOnInit(): void {\n\t\tconst methodName = \"ngOnInit\";\n\t\tthis.logger.entry(methodName);\n\n\t\tthis.loadLogMessages();\n\t\tthis.filterLogMessages();\n\n\t\t// subscribe to loggingService.logMessagesChanged event, to refresh, when new message is logged\n\t\tthis.logMessagesChangedSubscription = this.loggingService.logMessagesChanged.subscribe(async () => {\n\t\t\tthis.loadLogMessages();\n\t\t\tthis.filterLogMessages();\n\t\t});\n\n\t\t// subscribe to loggingViewerFilterService.filterChanged event, to refresh, when filter is modified\n\t\tthis.filterChangedSubscription = this.loggingViewerFilterService.filterChanged.subscribe(() => {\n\t\t\tthis.filterLogMessages();\n\t\t});\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Clean up.\n\t */\n\tpublic ngOnDestroy(): void {\n\t\tconst methodName = \"ngOnDestroy\";\n\t\tthis.logger.entry(methodName);\n\n\t\tthis.logMessagesChangedSubscription.unsubscribe();\n\t\tthis.filterChangedSubscription.unsubscribe();\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Filter the log messages.\n\t */\n\tpublic filterLogMessages(): void {\n\t\tthis.logMessagesForDisplay = this.logMessages.filter(\n\t\t\t(message) => this.filterLogMessagesByLevel(message) && this.filterLogMessagesBySearch(message));\n\t}\n\n\t/**\n\t * Check if the log message's level fulfills the level condition.\n\t *\n\t * @param message the log message to check\n\t * @returns true if check was successful\n\t */\n\tpublic filterLogMessagesByLevel(message: LogMessage): boolean {\n\t\tconst levelValue = this.loggingViewerFilterService.level;\n\t\treturn LogLevelConverter.levelFromString(message.level) >= LogLevelConverter.levelFromString(levelValue);\n\t}\n\n\t/**\n\t * Check if the log message fulfills the search condition.\n\t *\n\t * The search value gets searched in:\n\t * - logger name\n\t * - method name\n\t * - message\n\t *\n\t * @param message the log message to check\n\t * @returns true if check was successful\n\t */\n\tpublic filterLogMessagesBySearch(message: LogMessage): boolean {\n\t\tconst searchValue = new RegExp(this.loggingViewerFilterService.search, \"i\");\n\t\treturn message.logger.search(searchValue) >= 0 ||\n\t\t\tmessage.methodName.search(searchValue) >= 0 ||\n\t\t\tmessage.message.join(\"|\").search(searchValue) >= 0;\n\t}\n\n\t/**\n\t * Load the current log messages.\n\t * For unit test purposes mainly.\n\t */\n\tpublic loadLogMessages(): void {\n\t\tif (this.localStorageKeys) {\n\t\t\tthis.logMessages = [];\n\t\t\tfor (const localStorageKey of this.localStorageKeys.split(\",\")) {\n\t\t\t\tthis.logMessages = this.logMessages.concat(this.loggingService.getLogMessagesFromLocalStorage(localStorageKey));\n\t\t\t}\n\t\t\tthis.logMessages = this.logMessages.sort((a, b) => a.timeStamp.getTime() - b.timeStamp.getTime());\n\t\t} else {\n\t\t\tthis.logMessages = this.loggingService.getLogMessages();\n\t\t}\n\t}\n}\n","<ion-list>\n\t<ion-item *ngFor=\"let logMessage of logMessagesForDisplay\">\n\t\t<ion-label>\n\t\t\t<p>{{ logMessage.timeStamp | date:'dd.MM.yyyy HH:mm:ss' }} {{ logMessage.level }}</p>\n\t\t\t<p>{{ logMessage.logger }}</p>\n\t\t\t<p>\n\t\t\t\t{{ logMessage.methodName }}\n\t\t\t\t<span *ngFor=\"let messagePart of logMessage.message\"> {{ messagePart }} </span>\n\t\t\t</p>\n\t\t</ion-label>\n\t</ion-item>\n</ion-list>","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\n\nimport { Logger, LoggingService } from \"ionic-logging-service\";\n\nimport { LoggingViewerFilterService } from \"../logging-viewer-filter.service\";\n\n/**\n * Component for displaying the log levels for filtering the current logs.\n *\n * The component can be embedded in any web page using:\n *\n * <ionic-logging-viewer-levels></ionic-logging-viewer-levels>\n */\n@Component({\n\tselector: \"ionic-logging-viewer-levels\",\n\ttemplateUrl: \"./logging-viewer-levels.component.html\",\n\tstyleUrls: [\"./logging-viewer-levels.component.scss\"]\n})\nexport class LoggingViewerLevelsComponent implements OnInit, OnDestroy {\n\n\t/**\n\t * Log levels used for filtering: DEBUG, INFO, WARN, ERROR\n\t */\n\tpublic logLevels: string[];\n\n\t/**\n\t * Selected level.\n\t */\n\tpublic selectedLevel: string;\n\n\tprivate logger: Logger;\n\tprivate filterChangedSubscription: Subscription;\n\n\t/**\n\t * Creates a new instance of the component.\n\t */\n\tconstructor(\n\t\tloggingService: LoggingService,\n\t\tprivate loggingViewerFilterService: LoggingViewerFilterService) {\n\n\t\tthis.logger = loggingService.getLogger(\"Ionic.Logging.Viewer.Levels.Component\");\n\t\tconst methodName = \"ctor\";\n\t\tthis.logger.entry(methodName);\n\n\t\tthis.logLevels = [];\n\t\tthis.logLevels.push(\n\t\t\t\"DEBUG\",\n\t\t\t\"INFO\",\n\t\t\t\"WARN\",\n\t\t\t\"ERROR\",\n\t\t);\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Initialize the component.\n\t *\n\t * This is done by reading the filter data from [LoggingViewerFilterService](LoggingViewerFilterService.html).\n\t */\n\tpublic ngOnInit(): void {\n\t\tconst methodName = \"ngOnInit\";\n\t\tthis.logger.entry(methodName);\n\n\t\tthis.selectedLevel = this.loggingViewerFilterService.level;\n\n\t\t// subscribe to loggingViewerFilterService.filterChanged event, to refresh,\n\t\t// when someone else modifies the level\n\t\tthis.filterChangedSubscription = this.loggingViewerFilterService.filterChanged.subscribe(() => {\n\t\t\tthis.selectedLevel = this.loggingViewerFilterService.level;\n\t\t});\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Clean up.\n\t */\n\tpublic ngOnDestroy(): void {\n\t\tconst methodName = \"ngOnDestroy\";\n\t\tthis.logger.entry(methodName);\n\n\t\tthis.filterChangedSubscription.unsubscribe();\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Callback when the level was changed in the UI.\n\t */\n\tpublic onLevelChanged(): void {\n\t\tconst methodName = \"onLevelChanged\";\n\t\tthis.logger.entry(methodName, this.selectedLevel);\n\n\t\tthis.loggingViewerFilterService.level = this.selectedLevel;\n\n\t\tthis.logger.exit(methodName);\n\t}\n}\n","<ion-segment [(ngModel)]=\"selectedLevel\" (ionChange)=\"onLevelChanged()\">\n\t<ion-segment-button *ngFor=\"let logLevel of logLevels\" [value]=\"logLevel\">\n\t\t<ion-label>{{ logLevel }}</ion-label>\n\t</ion-segment-button>\n</ion-segment>","import { Component, OnInit, OnDestroy, Input } from \"@angular/core\";\n\nimport { Subscription } from \"rxjs\";\n\nimport { LoggingService, Logger } from \"ionic-logging-service\";\n\nimport { LoggingViewerFilterService } from \"../logging-viewer-filter.service\";\n\n/**\n * Component for displaying the search bar for filtering the current logs.\n *\n * The component can be embedded in any web page using:\n *\n * <ionic-logging-viewer-search placeholder=\"Search\"></ionic-logging-viewer-search>\n */\n@Component({\n\tselector: \"ionic-logging-viewer-search\",\n\ttemplateUrl: \"./logging-viewer-search.component.html\",\n\tstyleUrls: [\"./logging-viewer-search.component.scss\"]\n})\nexport class LoggingViewerSearchComponent implements OnInit, OnDestroy {\n\n\t/**\n\t * Placeholder to be shown in the empty search bar.\n\t */\n\t@Input()\n\tpublic placeholder: string;\n\n\t/**\n\t * Current search value.\n\t */\n\tpublic search: string;\n\n\tprivate logger: Logger;\n\tprivate filterChangedSubscription: Subscription;\n\n\t/**\n\t * Creates a new instance of the component.\n\t */\n\tconstructor(\n\t\tloggingService: LoggingService,\n\t\tprivate loggingViewerFilterService: LoggingViewerFilterService) {\n\n\t\tthis.logger = loggingService.getLogger(\"Ionic.Logging.Viewer.Search.Component\");\n\t\tconst methodName = \"ctor\";\n\t\tthis.logger.entry(methodName);\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Initialize the component.\n\t *\n\t * This is done by reading the filter data from [LoggingViewerFilterService](LoggingViewerFilterService.html).\n\t */\n\tpublic ngOnInit(): void {\n\t\tconst methodName = \"ngOnInit\";\n\t\tthis.logger.entry(methodName);\n\n\t\tif (!this.placeholder) {\n\t\t\tthis.placeholder = \"Search\";\n\t\t}\n\t\tthis.search = this.loggingViewerFilterService.search;\n\n\t\t// subscribe to loggingViewerFilterService.filterChanged event, to refresh,\n\t\t// when someone else modifies the search value\n\t\tthis.filterChangedSubscription = this.loggingViewerFilterService.filterChanged.subscribe(() => {\n\t\t\tthis.search = this.loggingViewerFilterService.search;\n\t\t});\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Clean up.\n\t */\n\tpublic ngOnDestroy(): void {\n\t\tconst methodName = \"ngOnDestroy\";\n\t\tthis.logger.entry(methodName);\n\n\t\tthis.filterChangedSubscription.unsubscribe();\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Callback when the search value was changed in the UI.\n\t */\n\tpublic onSearchChanged(): void {\n\t\tconst methodName = \"onSearchChanged\";\n\t\tthis.logger.entry(methodName, this.search);\n\n\t\tthis.loggingViewerFilterService.search = this.search;\n\n\t\tthis.logger.exit(methodName);\n\t}\n}\n","<ion-searchbar placeholder=\"{{placeholder}}\" [(ngModel)]=\"search\" (ionChange)=\"onSearchChanged()\"></ion-searchbar>","import { Component, OnInit, Input } from \"@angular/core\";\n\nimport { ModalController, Platform, AlertController } from \"@ionic/angular\";\n\nimport { Logger, LoggingService } from \"ionic-logging-service\";\n\nimport { LoggingViewerTranslation } from \"../logging-viewer-translation.model\";\n\n/**\n * Ionic modal containing [LoggingViewerComponent](LoggingViewerComponent.html),\n * [LoggingViewerLevelsComponent](LoggingViewerLevelsComponent.html) and\n * [LoggingViewerSearchComponent](LoggingViewerSearchComponent.html).\n */\n@Component({\n\tselector: \"ionic-logging-viewer-modal\",\n\ttemplateUrl: \"./logging-viewer-modal.component.html\",\n\tstyleUrls: [\"./logging-viewer-modal.component.scss\"]\n})\nexport class LoggingViewerModalComponent implements OnInit {\n\n\tprivate static languageEn = \"en\";\n\tprivate static languageDe = \"de\";\n\n\t/**\n\t * Language to be used for the modal.\n\t * Currently supported: en, de\n\t */\n\t@Input()\n\tpublic language: string;\n\n\t/**\n\t * Translation to be used for the modal.\n\t * If specified, the language is ignored.\n\t */\n\t@Input()\n\tpublic translation: LoggingViewerTranslation;\n\n\t/**\n\t * Comma-separated list of localStorageKeys. If set, the logs get loaded from localStorage instead of memory.\n\t */\n\t@Input()\n\tpublic localStorageKeys: string;\n\n\t/**\n\t * Flag showing a delete button, which removes all existing log messages.\n\t */\n\t@Input()\n\tpublic allowClearLogs: boolean;\n\n\t/**\n\t * Flag controlling which close button will be shown.\n\t */\n\tpublic isAndroid: boolean;\n\n\tprivate logger: Logger;\n\n\tprivate translations: { [language: string]: LoggingViewerTranslation };\n\n\t/**\n\t * Creates a new instance of the component.\n\t */\n\tconstructor(\n\t\tplatform: Platform,\n\t\tprivate alertController: AlertController,\n\t\tprivate modalController: ModalController,\n\t\tprivate loggingService: LoggingService) {\n\n\t\tthis.logger = loggingService.getLogger(\"Ionic.Logging.Viewer.Modal.Component\");\n\t\tconst methodName = \"ctor\";\n\t\tthis.logger.entry(methodName);\n\n\t\tthis.isAndroid = platform.is(\"android\");\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Initializes the LoggingViewerModalComponent.\n\t * It configures the supported translations.\n\t */\n\tpublic ngOnInit(): void {\n\t\t// prepare translations\n\t\tthis.translations = {};\n\t\tthis.translations[LoggingViewerModalComponent.languageEn] = {\n\t\t\tcancel: \"Cancel\",\n\t\t\tconfirmDelete: \"Delete all log messages?\",\n\t\t\tok: \"Ok\",\n\t\t\tsearchPlaceholder: \"Search\",\n\t\t\ttitle: \"Logging\",\n\t\t};\n\t\tthis.translations[LoggingViewerModalComponent.languageDe] = {\n\t\t\tcancel: \"Abbrechen\",\n\t\t\tconfirmDelete: \"Alle Logs löschen?\",\n\t\t\tok: \"Ok\",\n\t\t\tsearchPlaceholder: \"Suchen\",\n\t\t\ttitle: \"Logging\",\n\t\t};\n\t}\n\n\t/**\n\t * Eventhandler called by Ionic when the modal is opened.\n\t */\n\tpublic ionViewDidEnter(): void {\n\t\tconst methodName = \"ionViewDidEnter\";\n\t\tthis.logger.entry(methodName);\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Eventhandler called when the cancel button is clicked.\n\t */\n\tpublic async onClose(): Promise<void> {\n\t\tconst methodName = \"onClose\";\n\t\tthis.logger.entry(methodName);\n\n\t\tawait this.modalController.dismiss();\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Eventhandler called when the clear button is clicked.\n\t */\n\tpublic async onClearLogs(): Promise<void> {\n\t\tconst methodName = \"onClearLogs\";\n\t\tthis.logger.entry(methodName);\n\n\t\tconst alert = await this.alertController.create({\n\t\t\theader: this.getTranslation().confirmDelete,\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\ttext: this.getTranslation().cancel,\n\t\t\t\t\trole: \"cancel\",\n\t\t\t\t\tcssClass: \"secondary\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttext: this.getTranslation().ok,\n\t\t\t\t\thandler: () => {\n\t\t\t\t\t\tthis.clearLogs();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t]\n\t\t});\n\t\tawait alert.present();\n\n\t\tthis.logger.exit(methodName);\n\t}\n\n\t/**\n\t * Clear logs.\n\t */\n\tpublic clearLogs(): void {\n\t\tif (this.localStorageKeys) {\n\t\t\tfor (const localStorageKey of this.localStorageKeys.split(\",\")) {\n\t\t\t\tthis.loggingService.removeLogMessagesFromLocalStorage(localStorageKey);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.loggingService.removeLogMessages();\n\t\t}\n\t}\n\n\t/**\n\t * Helper method returning the current translation:\n\t * - the property translation if defined\n\t * - the translation according property language if valid\n\t * - English translation, otherwise\n\t */\n\tpublic getTranslation(): LoggingViewerTranslation {\n\t\tif (typeof this.translation !== \"undefined\") {\n\t\t\treturn this.translation;\n\t\t} else if (typeof this.language !== \"undefined\" && typeof this.translations[this.language] === \"object\") {\n\t\t\treturn this.translations[this.language];\n\t\t} else {\n\t\t\treturn this.translations[LoggingViewerModalComponent.languageEn];\n\t\t}\n\t}\n}\n","<ion-header>\n\t<ion-toolbar color=primary>\n\t\t<ion-title>{{ getTranslation().title }}</ion-title>\n\t\t<ion-buttons slot=\"start\">\n\t\t\t<ion-button *ngIf=\"!isAndroid\" (click)=\"onClose()\">\n\t\t\t\t{{ getTranslation().cancel }}\n\t\t\t</ion-button>\n\t\t\t<ion-button *ngIf=\"isAndroid\" icon-only (click)=\"onClose()\">\n\t\t\t\t<ion-icon name=\"md-close\"></ion-icon>\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\t</ion-toolbar>\n\t<ion-toolbar>\n\t\t<ionic-logging-viewer-search [placeholder]=\"getTranslation().searchPlaceholder\"></ionic-logging-viewer-search>\n\t\t<ion-buttons slot=\"end\" *ngIf=\"allowClearLogs !== false\" class=\"clearLogs\">\n\t\t\t<ion-button (click)=\"onClearLogs()\">\n\t\t\t\t<ion-icon name=\"trash-outline\"></ion-icon>\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\t</ion-toolbar>\n\t<ion-toolbar>\n\t\t<ionic-logging-viewer-levels></ionic-logging-viewer-levels>\n\t</ion-toolbar>\n</ion-header>\n<ion-content>\n\t<ionic-logging-viewer [localStorageKeys]=\"localStorageKeys\"></ionic-logging-viewer>\n</ion-content>","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { FormsModule } from \"@angular/forms\";\n\nimport { IonicModule } from \"@ionic/angular\";\n\nimport { LoggingViewerComponent } from \"./logging-viewer/logging-viewer.component\";\nimport { LoggingViewerFilterService } from \"./logging-viewer-filter.service\";\nimport { LoggingViewerLevelsComponent } from \"./logging-viewer-levels/logging-viewer-levels.component\";\nimport { LoggingViewerSearchComponent } from \"./logging-viewer-search/logging-viewer-search.component\";\nimport { LoggingViewerModalComponent } from \"./logging-viewer-modal/logging-viewer-modal.component\";\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n IonicModule\n ],\n declarations: [\n LoggingViewerComponent,\n LoggingViewerSearchComponent,\n LoggingViewerLevelsComponent,\n LoggingViewerModalComponent\n ],\n exports: [\n LoggingViewerComponent,\n LoggingViewerSearchComponent,\n LoggingViewerLevelsComponent,\n LoggingViewerModalComponent\n ],\n providers: [\n LoggingViewerFilterService\n ]\n})\nexport class LoggingViewerModule { }\n","/*\n * Public API Surface of ionic-logging-viewer\n */\n\nexport * from \"./lib/logging-viewer.module\";\nexport * from \"./lib/logging-viewer/logging-viewer.component\";\nexport * from \"./lib/logging-viewer-levels/logging-viewer-levels.component\";\nexport * from \"./lib/logging-viewer-search/logging-viewer-search.component\";\nexport * from \"./lib/logging-viewer-modal/logging-viewer-modal.component\";\nexport * from \"./lib/logging-viewer-modal/logging-viewer-modal-properties.model\";\nexport * from \"./lib/logging-viewer-translation.model\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAIA;;;MAIa,0BAA0B;;;;;;IAgBtC,YACC,cAA8B;QAE9B,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC,SAAS,CAAC,qCAAqC,CAAC,CAAC;QAC9E,MAAM,UAAU,GAAG,MAAM,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAE9B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC;QAC1B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,aAAa,GAAG,IAAI,YAAY,EAAQ,CAAC;QAE9C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KAC7B;;;;;;IAOD,IAAW,KAAK;QACf,OAAO,IAAI,CAAC,UAAU,CAAC;KACvB;;;;;;IAOD,IAAW,KAAK,CAAC,KAAa;QAC7B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;KAC1B;;;;;;;IAQD,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC;KACxB;;;;;;IAOD,IAAW,MAAM,CAAC,KAAa;QAC9B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,aAAa,CAAC,IAAI,E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Jc,sCAAU,GAAG,IAAK,CAAA;AAClB,sCAAU,GAAG,IAAK,CAAA;wHAHrB,2BAA2B;4GAA3B,2BAA2B,wMClBxC,+hCA0Bc;2FDRD,2BAA2B;kBALvC,SAAS;+BACC,4BAA4B;8LAc/B,QAAQ;sBADd,KAAK;gBAQC,WAAW;sBADjB,KAAK;gBAOC,gBAAgB;sBADtB,KAAK;gBAOC,cAAc;sBADpB,KAAK;;;MEZM,mBAAmB;;gHAAnB,mBAAmB;iHAAnB,mBAAmB,iBAfxB,sBAAsB;QACtB,4BAA4B;QAC5B,4BAA4B;QAC5B,2BAA2B,aAR3B,YAAY;QACZ,WAAW;QACX,WAAW,aASX,sBAAsB;QACtB,4BAA4B;QAC5B,4BAA4B;QAC5B,2BAA2B;iHAMtB,mBAAmB,aAJjB;QACP,0BAA0B;KAC7B,YAnBQ;YACL,YAAY;YACZ,WAAW;YACX,WAAW;SACd;2FAiBQ,mBAAmB;kBAtB/B,QAAQ;mBAAC;oBACN,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,WAAW;qBACd;oBACD,YAAY,EAAE;wBACV,sBAAsB;wBACtB,4BAA4B;wBAC5B,4BAA4B;wBAC5B,2BAA2B;qBAC9B;oBACD,OAAO,EAAE;wBACL,sBAAsB;wBACtB,4BAA4B;wBAC5B,4BAA4B;wBAC5B,2BAA2B;qBAC9B;oBACD,SAAS,EAAE;wBACP,0BAA0B;qBAC7B;iBACJ;;;ACjCD;;;;ACAA;;;;;;"}
|
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Injectable, Component, Input, NgModule } from '@angular/core';
|
|
3
|
+
import * as i4 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i4$1 from '@angular/forms';
|
|
6
|
+
import { FormsModule } from '@angular/forms';
|
|
7
|
+
import * as i1$1 from '@ionic/angular';
|
|
8
|
+
import { IonicModule } from '@ionic/angular';
|
|
9
|
+
import * as i1 from 'ionic-logging-service';
|
|
10
|
+
import { LogLevelConverter } from 'ionic-logging-service';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Service for storing filter settings for logging viewer.
|
|
14
|
+
*/
|
|
15
|
+
class LoggingViewerFilterService {
|
|
16
|
+
/**
|
|
17
|
+
* Creates a new instance of the service.
|
|
18
|
+
*
|
|
19
|
+
* @param loggingService needed for internal logging.
|
|
20
|
+
*/
|
|
21
|
+
constructor(loggingService) {
|
|
22
|
+
this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Filter.Service");
|
|
23
|
+
const methodName = "ctor";
|
|
24
|
+
this.logger.entry(methodName);
|
|
25
|
+
this.levelValue = "DEBUG";
|
|
26
|
+
this.searchValue = "";
|
|
27
|
+
this.filterChanged = new EventEmitter();
|
|
28
|
+
this.logger.exit(methodName);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Gets the current log level.
|
|
32
|
+
*
|
|
33
|
+
* @return log level
|
|
34
|
+
*/
|
|
35
|
+
get level() {
|
|
36
|
+
return this.levelValue;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Sets the new log level and emits a filterChanged event.
|
|
40
|
+
*
|
|
41
|
+
* @param value new slog level
|
|
42
|
+
*/
|
|
43
|
+
set level(value) {
|
|
44
|
+
this.levelValue = value;
|
|
45
|
+
this.filterChanged.emit();
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Gets the current search value.
|
|
49
|
+
*
|
|
50
|
+
* @return search value
|
|
51
|
+
*/
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/member-ordering
|
|
53
|
+
get search() {
|
|
54
|
+
return this.searchValue;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Sets the new search value and emits a filterChanged event.
|
|
58
|
+
*
|
|
59
|
+
* @param value new search value
|
|
60
|
+
*/
|
|
61
|
+
set search(value) {
|
|
62
|
+
this.searchValue = value;
|
|
63
|
+
this.filterChanged.emit();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
LoggingViewerFilterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerFilterService, deps: [{ token: i1.LoggingService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
67
|
+
LoggingViewerFilterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerFilterService });
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerFilterService, decorators: [{
|
|
69
|
+
type: Injectable
|
|
70
|
+
}], ctorParameters: function () { return [{ type: i1.LoggingService }]; } });
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Component for displaying the current logs.
|
|
74
|
+
*
|
|
75
|
+
* The component can be embedded in any web page using:
|
|
76
|
+
*
|
|
77
|
+
* <ionic-logging-viewer></ionic-logging-viewer>
|
|
78
|
+
*/
|
|
79
|
+
class LoggingViewerComponent {
|
|
80
|
+
/**
|
|
81
|
+
* Creates a new instance of the component.
|
|
82
|
+
*/
|
|
83
|
+
constructor(loggingService, loggingViewerFilterService) {
|
|
84
|
+
this.loggingService = loggingService;
|
|
85
|
+
this.loggingViewerFilterService = loggingViewerFilterService;
|
|
86
|
+
this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Component");
|
|
87
|
+
const methodName = "ctor";
|
|
88
|
+
this.logger.entry(methodName);
|
|
89
|
+
this.logger.exit(methodName);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Initialize the component.
|
|
93
|
+
*
|
|
94
|
+
* This is done by reading the filter data from [LoggingViewerFilterService](LoggingViewerFilterService.html)
|
|
95
|
+
* and the log messages from [LoggingService](../../../ionic-logging-service/typedoc/index.html).
|
|
96
|
+
* If the localStorageKeys property is set, the messages are read from local storage.
|
|
97
|
+
*/
|
|
98
|
+
ngOnInit() {
|
|
99
|
+
const methodName = "ngOnInit";
|
|
100
|
+
this.logger.entry(methodName);
|
|
101
|
+
this.loadLogMessages();
|
|
102
|
+
this.filterLogMessages();
|
|
103
|
+
// subscribe to loggingService.logMessagesChanged event, to refresh, when new message is logged
|
|
104
|
+
this.logMessagesChangedSubscription = this.loggingService.logMessagesChanged.subscribe(async () => {
|
|
105
|
+
this.loadLogMessages();
|
|
106
|
+
this.filterLogMessages();
|
|
107
|
+
});
|
|
108
|
+
// subscribe to loggingViewerFilterService.filterChanged event, to refresh, when filter is modified
|
|
109
|
+
this.filterChangedSubscription = this.loggingViewerFilterService.filterChanged.subscribe(() => {
|
|
110
|
+
this.filterLogMessages();
|
|
111
|
+
});
|
|
112
|
+
this.logger.exit(methodName);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Clean up.
|
|
116
|
+
*/
|
|
117
|
+
ngOnDestroy() {
|
|
118
|
+
const methodName = "ngOnDestroy";
|
|
119
|
+
this.logger.entry(methodName);
|
|
120
|
+
this.logMessagesChangedSubscription.unsubscribe();
|
|
121
|
+
this.filterChangedSubscription.unsubscribe();
|
|
122
|
+
this.logger.exit(methodName);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Filter the log messages.
|
|
126
|
+
*/
|
|
127
|
+
filterLogMessages() {
|
|
128
|
+
this.logMessagesForDisplay = this.logMessages.filter((message) => this.filterLogMessagesByLevel(message) && this.filterLogMessagesBySearch(message));
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Check if the log message's level fulfills the level condition.
|
|
132
|
+
*
|
|
133
|
+
* @param message the log message to check
|
|
134
|
+
* @returns true if check was successful
|
|
135
|
+
*/
|
|
136
|
+
filterLogMessagesByLevel(message) {
|
|
137
|
+
const levelValue = this.loggingViewerFilterService.level;
|
|
138
|
+
return LogLevelConverter.levelFromString(message.level) >= LogLevelConverter.levelFromString(levelValue);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Check if the log message fulfills the search condition.
|
|
142
|
+
*
|
|
143
|
+
* The search value gets searched in:
|
|
144
|
+
* - logger name
|
|
145
|
+
* - method name
|
|
146
|
+
* - message
|
|
147
|
+
*
|
|
148
|
+
* @param message the log message to check
|
|
149
|
+
* @returns true if check was successful
|
|
150
|
+
*/
|
|
151
|
+
filterLogMessagesBySearch(message) {
|
|
152
|
+
const searchValue = new RegExp(this.loggingViewerFilterService.search, "i");
|
|
153
|
+
return message.logger.search(searchValue) >= 0 ||
|
|
154
|
+
message.methodName.search(searchValue) >= 0 ||
|
|
155
|
+
message.message.join("|").search(searchValue) >= 0;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Load the current log messages.
|
|
159
|
+
* For unit test purposes mainly.
|
|
160
|
+
*/
|
|
161
|
+
loadLogMessages() {
|
|
162
|
+
if (this.localStorageKeys) {
|
|
163
|
+
this.logMessages = [];
|
|
164
|
+
for (const localStorageKey of this.localStorageKeys.split(",")) {
|
|
165
|
+
this.logMessages = this.logMessages.concat(this.loggingService.getLogMessagesFromLocalStorage(localStorageKey));
|
|
166
|
+
}
|
|
167
|
+
this.logMessages = this.logMessages.sort((a, b) => a.timeStamp.getTime() - b.timeStamp.getTime());
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
this.logMessages = this.loggingService.getLogMessages();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
LoggingViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerComponent, deps: [{ token: i1.LoggingService }, { token: LoggingViewerFilterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
175
|
+
LoggingViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: LoggingViewerComponent, selector: "ionic-logging-viewer", inputs: { localStorageKeys: "localStorageKeys" }, ngImport: i0, template: "<ion-list>\n\t<ion-item *ngFor=\"let logMessage of logMessagesForDisplay\">\n\t\t<ion-label>\n\t\t\t<p>{{ logMessage.timeStamp | date:'dd.MM.yyyy HH:mm:ss' }} {{ logMessage.level }}</p>\n\t\t\t<p>{{ logMessage.logger }}</p>\n\t\t\t<p>\n\t\t\t\t{{ logMessage.methodName }}\n\t\t\t\t<span *ngFor=\"let messagePart of logMessage.message\"> {{ messagePart }} </span>\n\t\t\t</p>\n\t\t</ion-label>\n\t</ion-item>\n</ion-list>", styles: [""], components: [{ type: i1$1.IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { type: i1$1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { type: i1$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "date": i4.DatePipe } });
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerComponent, decorators: [{
|
|
177
|
+
type: Component,
|
|
178
|
+
args: [{ selector: "ionic-logging-viewer", template: "<ion-list>\n\t<ion-item *ngFor=\"let logMessage of logMessagesForDisplay\">\n\t\t<ion-label>\n\t\t\t<p>{{ logMessage.timeStamp | date:'dd.MM.yyyy HH:mm:ss' }} {{ logMessage.level }}</p>\n\t\t\t<p>{{ logMessage.logger }}</p>\n\t\t\t<p>\n\t\t\t\t{{ logMessage.methodName }}\n\t\t\t\t<span *ngFor=\"let messagePart of logMessage.message\"> {{ messagePart }} </span>\n\t\t\t</p>\n\t\t</ion-label>\n\t</ion-item>\n</ion-list>", styles: [""] }]
|
|
179
|
+
}], ctorParameters: function () { return [{ type: i1.LoggingService }, { type: LoggingViewerFilterService }]; }, propDecorators: { localStorageKeys: [{
|
|
180
|
+
type: Input
|
|
181
|
+
}] } });
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Component for displaying the log levels for filtering the current logs.
|
|
185
|
+
*
|
|
186
|
+
* The component can be embedded in any web page using:
|
|
187
|
+
*
|
|
188
|
+
* <ionic-logging-viewer-levels></ionic-logging-viewer-levels>
|
|
189
|
+
*/
|
|
190
|
+
class LoggingViewerLevelsComponent {
|
|
191
|
+
/**
|
|
192
|
+
* Creates a new instance of the component.
|
|
193
|
+
*/
|
|
194
|
+
constructor(loggingService, loggingViewerFilterService) {
|
|
195
|
+
this.loggingViewerFilterService = loggingViewerFilterService;
|
|
196
|
+
this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Levels.Component");
|
|
197
|
+
const methodName = "ctor";
|
|
198
|
+
this.logger.entry(methodName);
|
|
199
|
+
this.logLevels = [];
|
|
200
|
+
this.logLevels.push("DEBUG", "INFO", "WARN", "ERROR");
|
|
201
|
+
this.logger.exit(methodName);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Initialize the component.
|
|
205
|
+
*
|
|
206
|
+
* This is done by reading the filter data from [LoggingViewerFilterService](LoggingViewerFilterService.html).
|
|
207
|
+
*/
|
|
208
|
+
ngOnInit() {
|
|
209
|
+
const methodName = "ngOnInit";
|
|
210
|
+
this.logger.entry(methodName);
|
|
211
|
+
this.selectedLevel = this.loggingViewerFilterService.level;
|
|
212
|
+
// subscribe to loggingViewerFilterService.filterChanged event, to refresh,
|
|
213
|
+
// when someone else modifies the level
|
|
214
|
+
this.filterChangedSubscription = this.loggingViewerFilterService.filterChanged.subscribe(() => {
|
|
215
|
+
this.selectedLevel = this.loggingViewerFilterService.level;
|
|
216
|
+
});
|
|
217
|
+
this.logger.exit(methodName);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Clean up.
|
|
221
|
+
*/
|
|
222
|
+
ngOnDestroy() {
|
|
223
|
+
const methodName = "ngOnDestroy";
|
|
224
|
+
this.logger.entry(methodName);
|
|
225
|
+
this.filterChangedSubscription.unsubscribe();
|
|
226
|
+
this.logger.exit(methodName);
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Callback when the level was changed in the UI.
|
|
230
|
+
*/
|
|
231
|
+
onLevelChanged() {
|
|
232
|
+
const methodName = "onLevelChanged";
|
|
233
|
+
this.logger.entry(methodName, this.selectedLevel);
|
|
234
|
+
this.loggingViewerFilterService.level = this.selectedLevel;
|
|
235
|
+
this.logger.exit(methodName);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
LoggingViewerLevelsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerLevelsComponent, deps: [{ token: i1.LoggingService }, { token: LoggingViewerFilterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
239
|
+
LoggingViewerLevelsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: LoggingViewerLevelsComponent, selector: "ionic-logging-viewer-levels", ngImport: i0, template: "<ion-segment [(ngModel)]=\"selectedLevel\" (ionChange)=\"onLevelChanged()\">\n\t<ion-segment-button *ngFor=\"let logLevel of logLevels\" [value]=\"logLevel\">\n\t\t<ion-label>{{ logLevel }}</ion-label>\n\t</ion-segment-button>\n</ion-segment>", styles: [""], components: [{ type: i1$1.IonSegment, selector: "ion-segment", inputs: ["color", "disabled", "mode", "scrollable", "selectOnFocus", "swipeGesture", "value"] }, { type: i1$1.IonSegmentButton, selector: "ion-segment-button", inputs: ["disabled", "layout", "mode", "type", "value"] }, { type: i1$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }], directives: [{ type: i1$1.SelectValueAccessor, selector: "ion-range, ion-select, ion-radio-group, ion-segment, ion-datetime" }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerLevelsComponent, decorators: [{
|
|
241
|
+
type: Component,
|
|
242
|
+
args: [{ selector: "ionic-logging-viewer-levels", template: "<ion-segment [(ngModel)]=\"selectedLevel\" (ionChange)=\"onLevelChanged()\">\n\t<ion-segment-button *ngFor=\"let logLevel of logLevels\" [value]=\"logLevel\">\n\t\t<ion-label>{{ logLevel }}</ion-label>\n\t</ion-segment-button>\n</ion-segment>", styles: [""] }]
|
|
243
|
+
}], ctorParameters: function () { return [{ type: i1.LoggingService }, { type: LoggingViewerFilterService }]; } });
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Component for displaying the search bar for filtering the current logs.
|
|
247
|
+
*
|
|
248
|
+
* The component can be embedded in any web page using:
|
|
249
|
+
*
|
|
250
|
+
* <ionic-logging-viewer-search placeholder="Search"></ionic-logging-viewer-search>
|
|
251
|
+
*/
|
|
252
|
+
class LoggingViewerSearchComponent {
|
|
253
|
+
/**
|
|
254
|
+
* Creates a new instance of the component.
|
|
255
|
+
*/
|
|
256
|
+
constructor(loggingService, loggingViewerFilterService) {
|
|
257
|
+
this.loggingViewerFilterService = loggingViewerFilterService;
|
|
258
|
+
this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Search.Component");
|
|
259
|
+
const methodName = "ctor";
|
|
260
|
+
this.logger.entry(methodName);
|
|
261
|
+
this.logger.exit(methodName);
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Initialize the component.
|
|
265
|
+
*
|
|
266
|
+
* This is done by reading the filter data from [LoggingViewerFilterService](LoggingViewerFilterService.html).
|
|
267
|
+
*/
|
|
268
|
+
ngOnInit() {
|
|
269
|
+
const methodName = "ngOnInit";
|
|
270
|
+
this.logger.entry(methodName);
|
|
271
|
+
if (!this.placeholder) {
|
|
272
|
+
this.placeholder = "Search";
|
|
273
|
+
}
|
|
274
|
+
this.search = this.loggingViewerFilterService.search;
|
|
275
|
+
// subscribe to loggingViewerFilterService.filterChanged event, to refresh,
|
|
276
|
+
// when someone else modifies the search value
|
|
277
|
+
this.filterChangedSubscription = this.loggingViewerFilterService.filterChanged.subscribe(() => {
|
|
278
|
+
this.search = this.loggingViewerFilterService.search;
|
|
279
|
+
});
|
|
280
|
+
this.logger.exit(methodName);
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Clean up.
|
|
284
|
+
*/
|
|
285
|
+
ngOnDestroy() {
|
|
286
|
+
const methodName = "ngOnDestroy";
|
|
287
|
+
this.logger.entry(methodName);
|
|
288
|
+
this.filterChangedSubscription.unsubscribe();
|
|
289
|
+
this.logger.exit(methodName);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Callback when the search value was changed in the UI.
|
|
293
|
+
*/
|
|
294
|
+
onSearchChanged() {
|
|
295
|
+
const methodName = "onSearchChanged";
|
|
296
|
+
this.logger.entry(methodName, this.search);
|
|
297
|
+
this.loggingViewerFilterService.search = this.search;
|
|
298
|
+
this.logger.exit(methodName);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
LoggingViewerSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerSearchComponent, deps: [{ token: i1.LoggingService }, { token: LoggingViewerFilterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
302
|
+
LoggingViewerSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: LoggingViewerSearchComponent, selector: "ionic-logging-viewer-search", inputs: { placeholder: "placeholder" }, ngImport: i0, template: "<ion-searchbar placeholder=\"{{placeholder}}\" [(ngModel)]=\"search\" (ionChange)=\"onSearchChanged()\"></ion-searchbar>", styles: ["ion-searchbar{padding-top:3px;padding-bottom:0}\n"], components: [{ type: i1$1.IonSearchbar, selector: "ion-searchbar", inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"] }], directives: [{ type: i1$1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerSearchComponent, decorators: [{
|
|
304
|
+
type: Component,
|
|
305
|
+
args: [{ selector: "ionic-logging-viewer-search", template: "<ion-searchbar placeholder=\"{{placeholder}}\" [(ngModel)]=\"search\" (ionChange)=\"onSearchChanged()\"></ion-searchbar>", styles: ["ion-searchbar{padding-top:3px;padding-bottom:0}\n"] }]
|
|
306
|
+
}], ctorParameters: function () { return [{ type: i1.LoggingService }, { type: LoggingViewerFilterService }]; }, propDecorators: { placeholder: [{
|
|
307
|
+
type: Input
|
|
308
|
+
}] } });
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Ionic modal containing [LoggingViewerComponent](LoggingViewerComponent.html),
|
|
312
|
+
* [LoggingViewerLevelsComponent](LoggingViewerLevelsComponent.html) and
|
|
313
|
+
* [LoggingViewerSearchComponent](LoggingViewerSearchComponent.html).
|
|
314
|
+
*/
|
|
315
|
+
class LoggingViewerModalComponent {
|
|
316
|
+
/**
|
|
317
|
+
* Creates a new instance of the component.
|
|
318
|
+
*/
|
|
319
|
+
constructor(platform, alertController, modalController, loggingService) {
|
|
320
|
+
this.alertController = alertController;
|
|
321
|
+
this.modalController = modalController;
|
|
322
|
+
this.loggingService = loggingService;
|
|
323
|
+
this.logger = loggingService.getLogger("Ionic.Logging.Viewer.Modal.Component");
|
|
324
|
+
const methodName = "ctor";
|
|
325
|
+
this.logger.entry(methodName);
|
|
326
|
+
this.isAndroid = platform.is("android");
|
|
327
|
+
this.logger.exit(methodName);
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Initializes the LoggingViewerModalComponent.
|
|
331
|
+
* It configures the supported translations.
|
|
332
|
+
*/
|
|
333
|
+
ngOnInit() {
|
|
334
|
+
// prepare translations
|
|
335
|
+
this.translations = {};
|
|
336
|
+
this.translations[LoggingViewerModalComponent.languageEn] = {
|
|
337
|
+
cancel: "Cancel",
|
|
338
|
+
confirmDelete: "Delete all log messages?",
|
|
339
|
+
ok: "Ok",
|
|
340
|
+
searchPlaceholder: "Search",
|
|
341
|
+
title: "Logging",
|
|
342
|
+
};
|
|
343
|
+
this.translations[LoggingViewerModalComponent.languageDe] = {
|
|
344
|
+
cancel: "Abbrechen",
|
|
345
|
+
confirmDelete: "Alle Logs löschen?",
|
|
346
|
+
ok: "Ok",
|
|
347
|
+
searchPlaceholder: "Suchen",
|
|
348
|
+
title: "Logging",
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Eventhandler called by Ionic when the modal is opened.
|
|
353
|
+
*/
|
|
354
|
+
ionViewDidEnter() {
|
|
355
|
+
const methodName = "ionViewDidEnter";
|
|
356
|
+
this.logger.entry(methodName);
|
|
357
|
+
this.logger.exit(methodName);
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Eventhandler called when the cancel button is clicked.
|
|
361
|
+
*/
|
|
362
|
+
async onClose() {
|
|
363
|
+
const methodName = "onClose";
|
|
364
|
+
this.logger.entry(methodName);
|
|
365
|
+
await this.modalController.dismiss();
|
|
366
|
+
this.logger.exit(methodName);
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Eventhandler called when the clear button is clicked.
|
|
370
|
+
*/
|
|
371
|
+
async onClearLogs() {
|
|
372
|
+
const methodName = "onClearLogs";
|
|
373
|
+
this.logger.entry(methodName);
|
|
374
|
+
const alert = await this.alertController.create({
|
|
375
|
+
header: this.getTranslation().confirmDelete,
|
|
376
|
+
buttons: [
|
|
377
|
+
{
|
|
378
|
+
text: this.getTranslation().cancel,
|
|
379
|
+
role: "cancel",
|
|
380
|
+
cssClass: "secondary"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
text: this.getTranslation().ok,
|
|
384
|
+
handler: () => {
|
|
385
|
+
this.clearLogs();
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
]
|
|
389
|
+
});
|
|
390
|
+
await alert.present();
|
|
391
|
+
this.logger.exit(methodName);
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Clear logs.
|
|
395
|
+
*/
|
|
396
|
+
clearLogs() {
|
|
397
|
+
if (this.localStorageKeys) {
|
|
398
|
+
for (const localStorageKey of this.localStorageKeys.split(",")) {
|
|
399
|
+
this.loggingService.removeLogMessagesFromLocalStorage(localStorageKey);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
this.loggingService.removeLogMessages();
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Helper method returning the current translation:
|
|
408
|
+
* - the property translation if defined
|
|
409
|
+
* - the translation according property language if valid
|
|
410
|
+
* - English translation, otherwise
|
|
411
|
+
*/
|
|
412
|
+
getTranslation() {
|
|
413
|
+
if (typeof this.translation !== "undefined") {
|
|
414
|
+
return this.translation;
|
|
415
|
+
}
|
|
416
|
+
else if (typeof this.language !== "undefined" && typeof this.translations[this.language] === "object") {
|
|
417
|
+
return this.translations[this.language];
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
return this.translations[LoggingViewerModalComponent.languageEn];
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
LoggingViewerModalComponent.languageEn = "en";
|
|
425
|
+
LoggingViewerModalComponent.languageDe = "de";
|
|
426
|
+
LoggingViewerModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerModalComponent, deps: [{ token: i1$1.Platform }, { token: i1$1.AlertController }, { token: i1$1.ModalController }, { token: i1.LoggingService }], target: i0.ɵɵFactoryTarget.Component });
|
|
427
|
+
LoggingViewerModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: LoggingViewerModalComponent, selector: "ionic-logging-viewer-modal", inputs: { language: "language", translation: "translation", localStorageKeys: "localStorageKeys", allowClearLogs: "allowClearLogs" }, ngImport: i0, template: "<ion-header>\n\t<ion-toolbar color=primary>\n\t\t<ion-title>{{ getTranslation().title }}</ion-title>\n\t\t<ion-buttons slot=\"start\">\n\t\t\t<ion-button *ngIf=\"!isAndroid\" (click)=\"onClose()\">\n\t\t\t\t{{ getTranslation().cancel }}\n\t\t\t</ion-button>\n\t\t\t<ion-button *ngIf=\"isAndroid\" icon-only (click)=\"onClose()\">\n\t\t\t\t<ion-icon name=\"md-close\"></ion-icon>\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\t</ion-toolbar>\n\t<ion-toolbar>\n\t\t<ionic-logging-viewer-search [placeholder]=\"getTranslation().searchPlaceholder\"></ionic-logging-viewer-search>\n\t\t<ion-buttons slot=\"end\" *ngIf=\"allowClearLogs !== false\" class=\"clearLogs\">\n\t\t\t<ion-button (click)=\"onClearLogs()\">\n\t\t\t\t<ion-icon name=\"trash-outline\"></ion-icon>\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\t</ion-toolbar>\n\t<ion-toolbar>\n\t\t<ionic-logging-viewer-levels></ionic-logging-viewer-levels>\n\t</ion-toolbar>\n</ion-header>\n<ion-content>\n\t<ionic-logging-viewer [localStorageKeys]=\"localStorageKeys\"></ionic-logging-viewer>\n</ion-content>", styles: ["ionic-logging-viewer-levels{width:100%;padding-left:12px;padding-right:12px}.clearLogs{padding-top:3px}\n"], components: [{ type: i1$1.IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { type: i1$1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { type: i1$1.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { type: i1$1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { type: i1$1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { type: i1$1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { type: LoggingViewerSearchComponent, selector: "ionic-logging-viewer-search", inputs: ["placeholder"] }, { type: LoggingViewerLevelsComponent, selector: "ionic-logging-viewer-levels" }, { type: i1$1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { type: LoggingViewerComponent, selector: "ionic-logging-viewer", inputs: ["localStorageKeys"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerModalComponent, decorators: [{
|
|
429
|
+
type: Component,
|
|
430
|
+
args: [{ selector: "ionic-logging-viewer-modal", template: "<ion-header>\n\t<ion-toolbar color=primary>\n\t\t<ion-title>{{ getTranslation().title }}</ion-title>\n\t\t<ion-buttons slot=\"start\">\n\t\t\t<ion-button *ngIf=\"!isAndroid\" (click)=\"onClose()\">\n\t\t\t\t{{ getTranslation().cancel }}\n\t\t\t</ion-button>\n\t\t\t<ion-button *ngIf=\"isAndroid\" icon-only (click)=\"onClose()\">\n\t\t\t\t<ion-icon name=\"md-close\"></ion-icon>\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\t</ion-toolbar>\n\t<ion-toolbar>\n\t\t<ionic-logging-viewer-search [placeholder]=\"getTranslation().searchPlaceholder\"></ionic-logging-viewer-search>\n\t\t<ion-buttons slot=\"end\" *ngIf=\"allowClearLogs !== false\" class=\"clearLogs\">\n\t\t\t<ion-button (click)=\"onClearLogs()\">\n\t\t\t\t<ion-icon name=\"trash-outline\"></ion-icon>\n\t\t\t</ion-button>\n\t\t</ion-buttons>\n\t</ion-toolbar>\n\t<ion-toolbar>\n\t\t<ionic-logging-viewer-levels></ionic-logging-viewer-levels>\n\t</ion-toolbar>\n</ion-header>\n<ion-content>\n\t<ionic-logging-viewer [localStorageKeys]=\"localStorageKeys\"></ionic-logging-viewer>\n</ion-content>", styles: ["ionic-logging-viewer-levels{width:100%;padding-left:12px;padding-right:12px}.clearLogs{padding-top:3px}\n"] }]
|
|
431
|
+
}], ctorParameters: function () { return [{ type: i1$1.Platform }, { type: i1$1.AlertController }, { type: i1$1.ModalController }, { type: i1.LoggingService }]; }, propDecorators: { language: [{
|
|
432
|
+
type: Input
|
|
433
|
+
}], translation: [{
|
|
434
|
+
type: Input
|
|
435
|
+
}], localStorageKeys: [{
|
|
436
|
+
type: Input
|
|
437
|
+
}], allowClearLogs: [{
|
|
438
|
+
type: Input
|
|
439
|
+
}] } });
|
|
440
|
+
|
|
441
|
+
class LoggingViewerModule {
|
|
442
|
+
}
|
|
443
|
+
LoggingViewerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
444
|
+
LoggingViewerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerModule, declarations: [LoggingViewerComponent,
|
|
445
|
+
LoggingViewerSearchComponent,
|
|
446
|
+
LoggingViewerLevelsComponent,
|
|
447
|
+
LoggingViewerModalComponent], imports: [CommonModule,
|
|
448
|
+
FormsModule,
|
|
449
|
+
IonicModule], exports: [LoggingViewerComponent,
|
|
450
|
+
LoggingViewerSearchComponent,
|
|
451
|
+
LoggingViewerLevelsComponent,
|
|
452
|
+
LoggingViewerModalComponent] });
|
|
453
|
+
LoggingViewerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerModule, providers: [
|
|
454
|
+
LoggingViewerFilterService
|
|
455
|
+
], imports: [[
|
|
456
|
+
CommonModule,
|
|
457
|
+
FormsModule,
|
|
458
|
+
IonicModule
|
|
459
|
+
]] });
|
|
460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LoggingViewerModule, decorators: [{
|
|
461
|
+
type: NgModule,
|
|
462
|
+
args: [{
|
|
463
|
+
imports: [
|
|
464
|
+
CommonModule,
|
|
465
|
+
FormsModule,
|
|
466
|
+
IonicModule
|
|
467
|
+
],
|
|
468
|
+
declarations: [
|
|
469
|
+
LoggingViewerComponent,
|
|
470
|
+
LoggingViewerSearchComponent,
|
|
471
|
+
LoggingViewerLevelsComponent,
|
|
472
|
+
LoggingViewerModalComponent
|
|
473
|
+
],
|
|
474
|
+
exports: [
|
|
475
|
+
LoggingViewerComponent,
|
|
476
|
+
LoggingViewerSearchComponent,
|
|
477
|
+
LoggingViewerLevelsComponent,
|
|
478
|
+
LoggingViewerModalComponent
|
|
479
|
+
],
|
|
480
|
+
providers: [
|
|
481
|
+
LoggingViewerFilterService
|
|
482
|
+
]
|
|
483
|
+
}]
|
|
484
|
+
}] });
|
|
485
|
+
|
|
486
|
+
/*
|
|
487
|
+
* Public API Surface of ionic-logging-viewer
|
|
488
|
+
*/
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Generated bundle index. Do not edit.
|
|
492
|
+
*/
|
|
493
|
+
|
|
494
|
+
export { LoggingViewerComponent, LoggingViewerLevelsComponent, LoggingViewerModalComponent, LoggingViewerModule, LoggingViewerSearchComponent };
|
|
495
|
+
//# sourceMappingURL=ionic-logging-viewer.mjs.map
|