ionic-logging-service 16.0.0 → 17.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 +1 -0
- package/esm2022/lib/ajax-appender.model.mjs +149 -0
- package/esm2022/lib/local-storage-appender.model.mjs +177 -0
- package/{esm2020 → esm2022}/lib/logging-service.module.mjs +5 -5
- package/{esm2020 → esm2022}/lib/logging.service.mjs +4 -4
- package/esm2022/lib/memory-appender.model.mjs +133 -0
- package/{fesm2015 → fesm2022}/ionic-logging-service.mjs +14 -14
- package/{fesm2020 → fesm2022}/ionic-logging-service.mjs.map +1 -1
- package/package.json +7 -13
- package/esm2020/lib/ajax-appender.model.mjs +0 -149
- package/esm2020/lib/local-storage-appender.model.mjs +0 -177
- package/esm2020/lib/memory-appender.model.mjs +0 -133
- package/fesm2015/ionic-logging-service.mjs.map +0 -1
- package/fesm2020/ionic-logging-service.mjs +0 -992
- /package/{esm2020 → esm2022}/ionic-logging-service.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/ajax-appender.configuration.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/browser-console-appender.configuration.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/json-layout.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/local-storage-appender.configuration.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/log-level.converter.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/log-level.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/log-message.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/logger.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/logging-service.configuration.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/memory-appender.configuration.mjs +0 -0
- /package/{esm2020 → esm2022}/public_api.mjs +0 -0
|
@@ -184,6 +184,9 @@ class LogLevelConverter {
|
|
|
184
184
|
* ```
|
|
185
185
|
*/
|
|
186
186
|
class AjaxAppender extends log4javascript.Appender {
|
|
187
|
+
static { this.batchSizeDefault = 1; }
|
|
188
|
+
static { this.timerIntervalDefault = 0; }
|
|
189
|
+
static { this.thresholdDefault = "WARN"; }
|
|
187
190
|
/**
|
|
188
191
|
* Creates a new instance of the appender.
|
|
189
192
|
*
|
|
@@ -310,9 +313,6 @@ class AjaxAppender extends log4javascript.Appender {
|
|
|
310
313
|
this.ajaxAppender.setTimerInterval(timerInterval);
|
|
311
314
|
}
|
|
312
315
|
}
|
|
313
|
-
AjaxAppender.batchSizeDefault = 1;
|
|
314
|
-
AjaxAppender.timerIntervalDefault = 0;
|
|
315
|
-
AjaxAppender.thresholdDefault = "WARN";
|
|
316
316
|
|
|
317
317
|
/**
|
|
318
318
|
* An appender which stores the log messages in the browser's local storage.
|
|
@@ -331,6 +331,8 @@ AjaxAppender.thresholdDefault = "WARN";
|
|
|
331
331
|
* ```
|
|
332
332
|
*/
|
|
333
333
|
class LocalStorageAppender extends log4javascript.Appender {
|
|
334
|
+
static { this.maxMessagesDefault = 250; }
|
|
335
|
+
static { this.thresholdDefault = "WARN"; }
|
|
334
336
|
/**
|
|
335
337
|
* Creates a new instance of the appender.
|
|
336
338
|
*
|
|
@@ -485,8 +487,6 @@ class LocalStorageAppender extends log4javascript.Appender {
|
|
|
485
487
|
localStorage.removeItem(this.localStorageKey);
|
|
486
488
|
}
|
|
487
489
|
}
|
|
488
|
-
LocalStorageAppender.maxMessagesDefault = 250;
|
|
489
|
-
LocalStorageAppender.thresholdDefault = "WARN";
|
|
490
490
|
|
|
491
491
|
/**
|
|
492
492
|
* Logger for writing log messages.
|
|
@@ -694,6 +694,8 @@ class Logger {
|
|
|
694
694
|
* ```
|
|
695
695
|
*/
|
|
696
696
|
class MemoryAppender extends log4javascript.Appender {
|
|
697
|
+
static { this.maxMessagesDefault = 250; }
|
|
698
|
+
static { this.thresholdDefault = "ALL"; }
|
|
697
699
|
/**
|
|
698
700
|
* Creates a new instance of the appender.
|
|
699
701
|
*
|
|
@@ -804,8 +806,6 @@ class MemoryAppender extends log4javascript.Appender {
|
|
|
804
806
|
this.onLogMessagesChangedCallback = callback;
|
|
805
807
|
}
|
|
806
808
|
}
|
|
807
|
-
MemoryAppender.maxMessagesDefault = 250;
|
|
808
|
-
MemoryAppender.thresholdDefault = "ALL";
|
|
809
809
|
|
|
810
810
|
/**
|
|
811
811
|
* Service for logging functionality.
|
|
@@ -956,10 +956,10 @@ class LoggingService {
|
|
|
956
956
|
LocalStorageAppender.removeLogMessages(localStorageKey);
|
|
957
957
|
this.logMessagesChanged.emit();
|
|
958
958
|
}
|
|
959
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
960
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingService, providedIn: "root" }); }
|
|
959
961
|
}
|
|
960
|
-
|
|
961
|
-
LoggingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoggingService, providedIn: "root" });
|
|
962
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoggingService, decorators: [{
|
|
962
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingService, decorators: [{
|
|
963
963
|
type: Injectable,
|
|
964
964
|
args: [{
|
|
965
965
|
providedIn: "root"
|
|
@@ -967,11 +967,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
967
967
|
}], ctorParameters: function () { return []; } });
|
|
968
968
|
|
|
969
969
|
class LoggingServiceModule {
|
|
970
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingServiceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
971
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.3", ngImport: i0, type: LoggingServiceModule }); }
|
|
972
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingServiceModule }); }
|
|
970
973
|
}
|
|
971
|
-
|
|
972
|
-
LoggingServiceModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: LoggingServiceModule });
|
|
973
|
-
LoggingServiceModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoggingServiceModule });
|
|
974
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: LoggingServiceModule, decorators: [{
|
|
974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LoggingServiceModule, decorators: [{
|
|
975
975
|
type: NgModule,
|
|
976
976
|
args: [{
|
|
977
977
|
imports: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ionic-logging-service.mjs","sources":["../../../projects/ionic-logging-service/src/lib/json-layout.model.ts","../../../projects/ionic-logging-service/src/lib/log-level.model.ts","../../../projects/ionic-logging-service/src/lib/log-level.converter.ts","../../../projects/ionic-logging-service/src/lib/ajax-appender.model.ts","../../../projects/ionic-logging-service/src/lib/local-storage-appender.model.ts","../../../projects/ionic-logging-service/src/lib/logger.model.ts","../../../projects/ionic-logging-service/src/lib/memory-appender.model.ts","../../../projects/ionic-logging-service/src/lib/logging.service.ts","../../../projects/ionic-logging-service/src/lib/logging-service.module.ts","../../../projects/ionic-logging-service/src/public_api.ts","../../../projects/ionic-logging-service/src/ionic-logging-service.ts"],"sourcesContent":["import * as log4javascript from \"log4javascript\";\nimport { LoggingEvent } from \"log4javascript\";\n\n/**\n * Formats a logging event into JavaScript Object Notation (JSON).\n * The implemenatation is mainly the same as with log4javascript.JsonLayout,\n * with an improvement of serializing messages containing '\\\"'.\"\n */\nexport class JsonLayout extends log4javascript.JsonLayout {\n\n\t/**\n\t * Formats the log message.\n\t */\n\tpublic format(loggingEvent: LoggingEvent): string {\n\t\tconst eventObj = {\n\t\t\tlogger: loggingEvent.logger.name,\n\t\t\ttimestamp: loggingEvent.timeStampInMilliseconds,\n\t\t\tlevel: loggingEvent.level.toString(),\n\t\t\turl: window.location.href,\n\t\t\tmessage: this.isCombinedMessages() ? loggingEvent.getCombinedMessages() : loggingEvent.messages\n\t\t};\n\t\treturn JSON.stringify(eventObj);\n\t}\n\n\t/**\n\t * Gets the layout's name.\n\t * Mainly for unit testing purposes.\n\t *\n\t * @return layout's name\n\t */\n\tpublic toString(): string {\n\t\treturn \"Ionic.Logging.JsonLayout\";\n\t}\n}\n","/**\n * Logging levels.\n */\nexport enum LogLevel {\n\t/**\n\t * All events should be logged.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tALL,\n\n\t/**\n\t * A fine-grained debug message, typically capturing the flow through the application.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tTRACE,\n\n\t/**\n\t * A general debugging event.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tDEBUG,\n\n\t/**\n\t * An event for informational purposes.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tINFO,\n\n\t/**\n\t * An event that might possible lead to an error.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tWARN,\n\n\t/**\n\t * An error in the application, possibly recoverable.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tERROR,\n\n\t/**\n\t * A severe error that will prevent the application from continuing.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tFATAL,\n\n\t/**\n\t * No events will be logged.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tOFF,\n}\n","import * as log4javascript from \"log4javascript\";\n\nimport { LogLevel } from \"./log-level.model\";\n\n/**\n * Helper class for converting log levels from and to different data type.\n */\nexport class LogLevelConverter {\n\n\t/**\n\t * Converts log4javascript.Level to internal LogLevel.\n\t *\n\t * @param level log4javascript's data type\n\t * @return internal data type.\n\t */\n\tpublic static levelFromLog4Javascript(level: log4javascript.Level): LogLevel {\n\t\tswitch (level) {\n\t\t\tcase log4javascript.Level.ALL:\n\t\t\t\treturn LogLevel.ALL;\n\t\t\tcase log4javascript.Level.DEBUG:\n\t\t\t\treturn LogLevel.DEBUG;\n\t\t\tcase log4javascript.Level.ERROR:\n\t\t\t\treturn LogLevel.ERROR;\n\t\t\tcase log4javascript.Level.FATAL:\n\t\t\t\treturn LogLevel.FATAL;\n\t\t\tcase log4javascript.Level.INFO:\n\t\t\t\treturn LogLevel.INFO;\n\t\t\tcase log4javascript.Level.OFF:\n\t\t\t\treturn LogLevel.OFF;\n\t\t\tcase log4javascript.Level.TRACE:\n\t\t\t\treturn LogLevel.TRACE;\n\t\t\tcase log4javascript.Level.WARN:\n\t\t\t\treturn LogLevel.WARN;\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`invalid level ${level}`);\n\t\t}\n\t}\n\n\t/**\n\t * Converts string representation to internal LogLevel.\n\t *\n\t * @param level string representation\n\t * @return internal data type.\n\t */\n\tpublic static levelFromString(level: string): LogLevel {\n\t\tswitch (level) {\n\t\t\tcase \"ALL\":\n\t\t\t\treturn LogLevel.ALL;\n\t\t\tcase \"DEBUG\":\n\t\t\t\treturn LogLevel.DEBUG;\n\t\t\tcase \"ERROR\":\n\t\t\t\treturn LogLevel.ERROR;\n\t\t\tcase \"FATAL\":\n\t\t\t\treturn LogLevel.FATAL;\n\t\t\tcase \"INFO\":\n\t\t\t\treturn LogLevel.INFO;\n\t\t\tcase \"OFF\":\n\t\t\t\treturn LogLevel.OFF;\n\t\t\tcase \"TRACE\":\n\t\t\t\treturn LogLevel.TRACE;\n\t\t\tcase \"WARN\":\n\t\t\t\treturn LogLevel.WARN;\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`invalid level ${level}`);\n\t\t}\n\t}\n\n\t/**\n\t * Converts internal LogLevel to log4javascript.Level.\n\t *\n\t * @param internal data type.\n\t * @return level log4javascript's data type\n\t */\n\tpublic static levelToLog4Javascript(level: LogLevel): log4javascript.Level {\n\t\tswitch (level) {\n\t\t\tcase LogLevel.ALL:\n\t\t\t\treturn log4javascript.Level.ALL;\n\t\t\tcase LogLevel.DEBUG:\n\t\t\t\treturn log4javascript.Level.DEBUG;\n\t\t\tcase LogLevel.ERROR:\n\t\t\t\treturn log4javascript.Level.ERROR;\n\t\t\tcase LogLevel.FATAL:\n\t\t\t\treturn log4javascript.Level.FATAL;\n\t\t\tcase LogLevel.INFO:\n\t\t\t\treturn log4javascript.Level.INFO;\n\t\t\tcase LogLevel.OFF:\n\t\t\t\treturn log4javascript.Level.OFF;\n\t\t\tcase LogLevel.TRACE:\n\t\t\t\treturn log4javascript.Level.TRACE;\n\t\t\tcase LogLevel.WARN:\n\t\t\t\treturn log4javascript.Level.WARN;\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`invalid level ${level}`);\n\t\t}\n\t}\n}\n","import { EventEmitter } from \"@angular/core\";\n\nimport * as log4javascript from \"log4javascript\";\n\nimport { AjaxAppenderConfiguration } from \"./ajax-appender.configuration\";\nimport { JsonLayout } from \"./json-layout.model\";\nimport { LogLevelConverter } from \"./log-level.converter\";\n\n/**\n * An appender which sends the log messages to a server via HTTP.\n *\n * A typical configuration could be:\n *\n * ```json\n * {\n * \"url\": \"https://my.backend.xy/LoggingBackend\",\n * \"batchSize\": 10,\n * \"timerInterval\": 60000,\n * \"threshold\": \"INFO\"\n * }\n * ```\n */\nexport class AjaxAppender extends log4javascript.Appender {\n\n\tprivate static batchSizeDefault = 1;\n\tprivate static timerIntervalDefault = 0;\n\tprivate static thresholdDefault = \"WARN\";\n\n\t/**\n\t * Event triggered when the appender could not send log messages to the server.\n\t *\n\t * @param message error message\n\t */\n\tpublic appenderFailed: EventEmitter<string>;\n\n\tprivate ajaxAppender: log4javascript.AjaxAppender;\n\tprivate url: string;\n\tprivate withCredentials: boolean;\n\n\t/**\n\t * Creates a new instance of the appender.\n\t *\n\t * @param configuration configuration for the appender.\n\t */\n\tconstructor(configuration: AjaxAppenderConfiguration) {\n\t\tsuper();\n\n\t\tif (!configuration) {\n\t\t\tthrow new Error(\"configuration must be not empty\");\n\t\t}\n\t\tif (!configuration.url) {\n\t\t\tthrow new Error(\"url must be not empty\");\n\t\t}\n\t\tthis.ajaxAppender = new log4javascript.AjaxAppender(configuration.url, configuration.withCredentials);\n\t\tthis.url = configuration.url;\n\t\tthis.withCredentials = configuration.withCredentials;\n\n\t\tthis.ajaxAppender.setLayout(new JsonLayout(false, false));\n\t\tthis.ajaxAppender.addHeader(\"Content-Type\", \"application/json; charset=utf-8\");\n\t\tthis.ajaxAppender.setSendAllOnUnload(true);\n\n\t\tthis.appenderFailed = new EventEmitter<string>();\n\t\tthis.ajaxAppender.setFailCallback((message: any) => {\n\t\t\tthis.appenderFailed.emit(message);\n\t\t});\n\n\t\t// process remaining configuration\n\t\tthis.configure({\n\t\t\tbatchSize: configuration.batchSize || AjaxAppender.batchSizeDefault,\n\t\t\tthreshold: configuration.threshold || AjaxAppender.thresholdDefault,\n\t\t\ttimerInterval: configuration.timerInterval || AjaxAppender.timerIntervalDefault,\n\t\t\turl: configuration.url,\n\t\t\twithCredentials: configuration.withCredentials\n\t\t});\n\n\t}\n\n\t/**\n\t * Configures the logging depending on the given configuration.\n\t *\n\t * Only the defined properties get overwritten.\n\t * Neither url nor withCredentials can be modified.\n\t *\n\t * @param configuration configuration data.\n\t */\n\tpublic configure(configuration: AjaxAppenderConfiguration): void {\n\t\tif (configuration) {\n\t\t\tif (configuration.url && configuration.url !== this.url) {\n\t\t\t\tthrow new Error(\"url must not be changed\");\n\t\t\t}\n\t\t\tif (configuration.withCredentials && configuration.withCredentials !== this.withCredentials) {\n\t\t\t\tthrow new Error(\"withCredentials must not be changed\");\n\t\t\t}\n\t\t\tif (configuration.batchSize) {\n\t\t\t\tthis.setBatchSize(configuration.batchSize);\n\t\t\t}\n\t\t\tif (typeof configuration.timerInterval === \"number\") {\n\t\t\t\tthis.setTimerInterval(configuration.timerInterval);\n\t\t\t}\n\t\t\tif (configuration.threshold) {\n\t\t\t\tconst convertedThreshold = LogLevelConverter.levelToLog4Javascript(\n\t\t\t\t\tLogLevelConverter.levelFromString(configuration.threshold));\n\t\t\t\tthis.setThreshold(convertedThreshold);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Appender-specific method to append a log message.\n\t *\n\t * @param loggingEvent event to be appended.\n\t */\n\tpublic append(loggingEvent: log4javascript.LoggingEvent): void {\n\t\tthis.ajaxAppender.append(loggingEvent);\n\t}\n\n\t/**\n\t * Gets the appender's name.\n\t * Mainly for unit testing purposes.\n\t *\n\t * @return appender's name\n\t */\n\tpublic toString(): string {\n\t\treturn \"Ionic.Logging.AjaxAppender\";\n\t}\n\n\t/**\n\t * Get the internally used appender.\n\t * Mainly for unit testing purposes.\n\t */\n\tpublic getInternalAppender(): log4javascript.AjaxAppender {\n\t\treturn this.ajaxAppender;\n\t}\n\n\t/**\n\t * Returns the number of log messages sent in each request.\n\t */\n\tpublic getBatchSize(): number {\n\t\treturn this.ajaxAppender.getBatchSize();\n\t}\n\n\t/**\n\t * Sets the number of log messages to send in each request.\n\t *\n\t * @param batchSize new batch size\n\t */\n\tpublic setBatchSize(batchSize: number): void {\n\t\tthis.ajaxAppender.setBatchSize(batchSize);\n\t}\n\n\t/**\n\t * Returns the appender's layout.\n\t */\n\tpublic getLayout(): log4javascript.Layout {\n\t\treturn this.ajaxAppender.getLayout();\n\t}\n\n\t/**\n\t * Sets the appender's layout.\n\t */\n\tpublic setLayout(layout: log4javascript.Layout): void {\n\t\tthis.ajaxAppender.setLayout(layout);\n\t}\n\n\t/**\n\t * Returns the length of time in milliseconds between each sending of queued log messages.\n\t */\n\tpublic getTimerInterval(): number {\n\t\treturn this.ajaxAppender.getTimerInterval();\n\t}\n\n\t/**\n\t * Sets the length of time in milliseconds between each sending of queued log messages.\n\t *\n\t * @param timerInterval new timer interval\n\t */\n\tpublic setTimerInterval(timerInterval: number): void {\n\t\tthis.ajaxAppender.setTimed(timerInterval > 0);\n\t\tthis.ajaxAppender.setTimerInterval(timerInterval);\n\t}\n}\n","import * as log4javascript from \"log4javascript\";\n\nimport { LocalStorageAppenderConfiguration } from \"./local-storage-appender.configuration\";\nimport { LogLevelConverter } from \"./log-level.converter\";\nimport { LogLevel } from \"./log-level.model\";\nimport { LogMessage } from \"./log-message.model\";\n\n/**\n * An appender which stores the log messages in the browser's local storage.\n *\n * The messages are saved JSON-serialized.\n * You have to configure which key is used for storing the messages.\n *\n * A typical configuration could be:\n *\n * ```json\n * {\n * \"localStorageKey\": \"myLogs\",\n * \"maxMessages\": 500,\n * \"threshold\": \"INFO\"\n * }\n * ```\n */\nexport class LocalStorageAppender extends log4javascript.Appender {\n\n\tprivate static maxMessagesDefault = 250;\n\tprivate static thresholdDefault = \"WARN\";\n\n\tprivate maxMessages: number;\n\n\tprivate localStorageKey: string;\n\tprivate logMessages: LogMessage[];\n\n\t/**\n\t * Creates a new instance of the appender.\n\t *\n\t * @param configuration configuration for the appender.\n\t */\n\tconstructor(configuration: LocalStorageAppenderConfiguration) {\n\t\tsuper();\n\n\t\tif (!configuration) {\n\t\t\tthrow new Error(\"configuration must be not empty\");\n\t\t}\n\t\tif (!configuration.localStorageKey || configuration.localStorageKey === \"\") {\n\t\t\tthrow new Error(\"localStorageKey must be not empty\");\n\t\t}\n\t\tthis.localStorageKey = configuration.localStorageKey;\n\n\t\t// read existing logMessages\n\t\tthis.logMessages = LocalStorageAppender.loadLogMessages(this.localStorageKey);\n\n\t\t// process remaining configuration\n\t\tthis.configure({\n\t\t\tlocalStorageKey: configuration.localStorageKey,\n\t\t\tmaxMessages: configuration.maxMessages || LocalStorageAppender.maxMessagesDefault,\n\t\t\tthreshold: configuration.threshold || LocalStorageAppender.thresholdDefault,\n\t\t});\n\t}\n\n\t/**\n\t * Load log messages from local storage which are stored there under the given key.\n\t *\n\t * @param localStorageKey local storage key\n\t * @return stored messages\n\t */\n\tpublic static loadLogMessages(localStorageKey: string): LogMessage[] {\n\t\tlet logMessages: LogMessage[];\n\n\t\tif (!localStorageKey || localStorage.getItem(localStorageKey) === null) {\n\t\t\tlogMessages = [];\n\t\t} else {\n\t\t\tlogMessages = JSON.parse(localStorage.getItem(localStorageKey));\n\t\t\tfor (const logMessage of logMessages) {\n\t\t\t\t// timestamps are serialized as strings\n\t\t\t\tlogMessage.timeStamp = new Date(logMessage.timeStamp);\n\t\t\t}\n\t\t}\n\n\t\treturn logMessages;\n\t}\n\n\t/**\n\t * Remove log messages from local storage which are stored there under the given key.\n\t *\n\t * @param localStorageKey local storage key\n\t */\n\tpublic static removeLogMessages(localStorageKey: string): void {\n\t\tlocalStorage.removeItem(localStorageKey);\n\t}\n\n\t/**\n\t * Configures the logging depending on the given configuration.\n\t *\n\t * Only the defined properties get overwritten.\n\t * The localStorageKey cannot be modified.\n\t *\n\t * @param configuration configuration data.\n\t */\n\tpublic configure(configuration: LocalStorageAppenderConfiguration): void {\n\t\tif (configuration) {\n\t\t\tif (configuration.localStorageKey && configuration.localStorageKey !== this.localStorageKey) {\n\t\t\t\tthrow new Error(\"localStorageKey must not be changed\");\n\t\t\t}\n\t\t\tif (configuration.maxMessages) {\n\t\t\t\tthis.setMaxMessages(configuration.maxMessages);\n\t\t\t}\n\t\t\tif (configuration.threshold) {\n\t\t\t\tconst convertedThreshold = LogLevelConverter.levelToLog4Javascript(\n\t\t\t\t\tLogLevelConverter.levelFromString(configuration.threshold));\n\t\t\t\tthis.setThreshold(convertedThreshold);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Appender-specific method to append a log message.\n\t *\n\t * @param loggingEvent event to be appended.\n\t */\n\tpublic append(loggingEvent: log4javascript.LoggingEvent): void {\n\t\t// if logMessages is already full, remove oldest element\n\t\twhile (this.logMessages.length >= this.maxMessages) {\n\t\t\tthis.logMessages.shift();\n\t\t}\n\t\t// add event to logMessages\n\t\tconst message: LogMessage = {\n\t\t\tlevel: LogLevel[LogLevelConverter.levelFromLog4Javascript(loggingEvent.level)],\n\t\t\tlogger: typeof loggingEvent.logger !== \"undefined\" ? loggingEvent.logger.name : undefined,\n\t\t\tmessage: loggingEvent.messages.slice(1),\n\t\t\tmethodName: loggingEvent.messages[0],\n\t\t\ttimeStamp: loggingEvent.timeStamp,\n\t\t};\n\t\tthis.logMessages.push(message);\n\n\t\t// write values to localStorage\n\t\tlocalStorage.setItem(this.localStorageKey, JSON.stringify(this.logMessages));\n\t}\n\n\t/**\n\t * Gets the appender's name.\n\t * Mainly for unit testing purposes.\n\t *\n\t * @return appender's name\n\t */\n\tpublic toString(): string {\n\t\treturn \"Ionic.Logging.LocalStorageAppender\";\n\t}\n\n\t/**\n\t * Get the key which is used to store the messages in the local storage.\n\t */\n\tpublic getLocalStorageKey(): string {\n\t\treturn this.localStorageKey;\n\t}\n\n\t/**\n\t * Get the maximum number of messages which will be stored in local storage.\n\t */\n\tpublic getMaxMessages(): number {\n\t\treturn this.maxMessages;\n\t}\n\n\t/**\n\t * Set the maximum number of messages which will be stored in local storage.\n\t *\n\t * If the appender stores currently more messages than the new value allows, the oldest messages get removed.\n\t *\n\t * @param value new maximum number\n\t */\n\tpublic setMaxMessages(value: number): void {\n\t\tif (this.maxMessages !== value) {\n\t\t\tthis.maxMessages = value;\n\n\t\t\tif (this.logMessages.length > this.maxMessages) {\n\t\t\t\t// there are too much logMessages for the new value, therefore remove oldest messages\n\t\t\t\twhile (this.logMessages.length > this.maxMessages) {\n\t\t\t\t\tthis.logMessages.shift();\n\t\t\t\t}\n\n\t\t\t\t// write values to localStorage\n\t\t\t\tlocalStorage.setItem(this.localStorageKey, JSON.stringify(this.logMessages));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Gets all messages stored in local storage.\n\t * Mainly for unit testing purposes.\n\t *\n\t * @return stored messages\n\t */\n\tpublic getLogMessages(): LogMessage[] {\n\t\treturn this.logMessages;\n\t}\n\n\t/**\n\t * Removes all messages from local storage.\n\t * Mainly for unit testing purposes.\n\t */\n\tpublic clearLog(): void {\n\t\tthis.logMessages = [];\n\t\tlocalStorage.removeItem(this.localStorageKey);\n\t}\n}\n","import * as log4javascript from \"log4javascript\";\n\nimport { LogLevelConverter } from \"./log-level.converter\";\nimport { LogLevel } from \"./log-level.model\";\n\n/**\n * Logger for writing log messages.\n */\nexport class Logger {\n\n\tprivate logger: log4javascript.Logger;\n\n\t/**\n\t * Creates a new instance of a logger.\n\t */\n\tconstructor(logger?: string | any) {\n\t\tif (typeof logger === \"undefined\") {\n\t\t\tthis.logger = log4javascript.getRootLogger();\n\t\t} else if (typeof logger === \"string\") {\n\t\t\tthis.logger = log4javascript.getLogger(logger);\n\t\t} else {\n\t\t\tthis.logger = logger;\n\t\t}\n\t}\n\n\t/**\n\t * Get the log level.\n\t */\n\tpublic getLogLevel(): LogLevel {\n\t\treturn LogLevelConverter.levelFromLog4Javascript(this.logger.getLevel());\n\t}\n\n\t/**\n\t * Set the log level.\n\t *\n\t * @param level the new log level\n\t */\n\tpublic setLogLevel(level: LogLevel): void {\n\t\tthis.logger.setLevel(LogLevelConverter.levelToLog4Javascript(level));\n\t}\n\n\t/**\n\t * Logs a message at level TRACE.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic trace(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isTraceEnabled()) {\n\t\t\tconst args = [methodName];\n\t\t\tfor (const param of params) {\n\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t}\n\t\t\tthis.logger.trace.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs a message at level DEBUG.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic debug(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isDebugEnabled()) {\n\t\t\tconst args = [methodName];\n\t\t\tfor (const param of params) {\n\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t}\n\t\t\tthis.logger.debug.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs a message at level INFO.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic info(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isInfoEnabled()) {\n\t\t\tconst args = [methodName];\n\t\t\tfor (const param of params) {\n\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t}\n\t\t\tthis.logger.info.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs a message at level WARN.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic warn(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isWarnEnabled()) {\n\t\t\tconst args = [methodName];\n\t\t\tfor (const param of params) {\n\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t}\n\t\t\tthis.logger.warn.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs a message at level ERROR.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic error(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isErrorEnabled()) {\n\t\t\tconst args = [methodName];\n\t\t\tfor (const param of params) {\n\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t}\n\t\t\tthis.logger.error.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs a message at level FATAL.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic fatal(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isFatalEnabled()) {\n\t\t\tconst args = [methodName];\n\t\t\tfor (const param of params) {\n\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t}\n\t\t\tthis.logger.fatal.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs the entry into a method.\n\t * The method name will be logged at level INFO, the parameters at level DEBUG.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic entry(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isInfoEnabled()) {\n\t\t\tconst args = [methodName, \"entry\"];\n\t\t\tif (this.logger.isDebugEnabled()) {\n\t\t\t\tfor (const param of params) {\n\t\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.logger.info.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs the exit of a method.\n\t * The method name will be logged at level INFO, the parameters at level DEBUG.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic exit(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isInfoEnabled()) {\n\t\t\tconst args = [methodName, \"exit\"];\n\t\t\tif (this.logger.isDebugEnabled()) {\n\t\t\t\tfor (const param of params) {\n\t\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.logger.info.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Formats the given argument.\n\t */\n\tpublic formatArgument(arg: any): string {\n\t\tif (typeof arg === \"string\") {\n\t\t\treturn arg;\n\t\t} else if (typeof arg === \"number\") {\n\t\t\treturn arg.toString();\n\t\t} else if (arg instanceof Error) {\n\t\t\t// JSON.stringify() returns here \"{ }\"\n\t\t\treturn arg.toString();\n\t\t} else {\n\t\t\ttry {\n\t\t\t\treturn JSON.stringify(arg);\n\t\t\t} catch (e) {\n\t\t\t\treturn e.message;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns the internal Logger (for unit tests only).\n\t */\n\tpublic getInternalLogger(): log4javascript.Logger {\n\t\treturn this.logger;\n\t}\n}\n","import * as log4javascript from \"log4javascript\";\n\nimport { LogLevelConverter } from \"./log-level.converter\";\nimport { LogLevel } from \"./log-level.model\";\nimport { LogMessage } from \"./log-message.model\";\nimport { MemoryAppenderConfiguration } from \"./memory-appender.configuration\";\n\n/**\n * An appender which stores the log messages in the browser's memory.\n *\n * The MemoryAppender is enabled by default.\n * If you do not specify anything else, it is using this configuration:\n *\n * ```JSON\n * {\n * \"memoryAppender\": [\n * {\n * \"maxMessages\": 250,\n * \"threshold\": \"ALL\"\n * }\n * }\n * ```\n */\nexport class MemoryAppender extends log4javascript.Appender {\n\n\tprivate static maxMessagesDefault = 250;\n\tprivate static thresholdDefault = \"ALL\";\n\n\tprivate maxMessages: number;\n\n\tprivate logMessages: LogMessage[];\n\tprivate onLogMessagesChangedCallback: (message: LogMessage) => void;\n\n\t/**\n\t * Creates a new instance of the appender.\n\t *\n\t * @param configuration configuration for the appender.\n\t */\n\tconstructor(configuration?: MemoryAppenderConfiguration) {\n\t\tsuper();\n\n\t\tthis.logMessages = [];\n\n\t\t// process configuration\n\t\tconfiguration = configuration || {};\n\t\tthis.configure({\n\t\t\tmaxMessages: configuration.maxMessages || MemoryAppender.maxMessagesDefault,\n\t\t\tthreshold: configuration.threshold || MemoryAppender.thresholdDefault,\n\t\t});\n\n\t\tthis.maxMessages = MemoryAppender.maxMessagesDefault;\n\t}\n\n\t/**\n\t * Configures the logging depending on the given configuration.\n\t * Only the defined properties get overwritten.\n\t *\n\t * @param configuration configuration data.\n\t */\n\tpublic configure(configuration: MemoryAppenderConfiguration): void {\n\t\tif (configuration) {\n\t\t\tif (configuration.maxMessages) {\n\t\t\t\tthis.setMaxMessages(configuration.maxMessages);\n\t\t\t}\n\t\t\tif (configuration.threshold) {\n\t\t\t\tconst convertedThreshold = LogLevelConverter.levelToLog4Javascript(\n\t\t\t\t\tLogLevelConverter.levelFromString(configuration.threshold));\n\t\t\t\tthis.setThreshold(convertedThreshold);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Appender-specific method to append a log message.\n\t *\n\t * @param loggingEvent event to be appended.\n\t */\n\tpublic append(loggingEvent: log4javascript.LoggingEvent): void {\n\t\t// if logMessages is already full, remove oldest element\n\t\twhile (this.logMessages.length >= this.maxMessages) {\n\t\t\tthis.logMessages.shift();\n\t\t}\n\t\t// add event to logMessages\n\t\tconst message: LogMessage = {\n\t\t\tlevel: LogLevel[LogLevelConverter.levelFromLog4Javascript(loggingEvent.level)],\n\t\t\tlogger: typeof loggingEvent.logger === \"object\" ? loggingEvent.logger.name : undefined,\n\t\t\tmessage: loggingEvent.messages.slice(1),\n\t\t\tmethodName: loggingEvent.messages[0],\n\t\t\ttimeStamp: loggingEvent.timeStamp,\n\t\t};\n\t\tthis.logMessages.push(message);\n\n\t\t// inform about new message\n\t\tif (typeof this.onLogMessagesChangedCallback === \"function\") {\n\t\t\tthis.onLogMessagesChangedCallback(message);\n\t\t}\n\t}\n\n\t/**\n\t * Gets the appender's name.\n\t * Mainly for unit testing purposes.\n\t *\n\t * @return appender's name\n\t */\n\tpublic toString(): string {\n\t\treturn \"Ionic.Logging.MemoryAppender\";\n\t}\n\n\t/**\n\t * Get the maximum number of messages which will be stored in memory.\n\t */\n\tpublic getMaxMessages(): number {\n\t\treturn this.maxMessages;\n\t}\n\n\t/**\n\t * Set the maximum number of messages which will be stored in memory.\n\t *\n\t * If the appender stores currently more messages than the new value allows, the oldest messages get removed.\n\t *\n\t * @param value new maximum number\n\t */\n\tpublic setMaxMessages(value: number): void {\n\t\tthis.maxMessages = value;\n\n\t\t// if there are too much logMessages for the new value, remove oldest messages\n\t\tif (this.logMessages.length > this.maxMessages) {\n\t\t\tthis.logMessages.splice(0, this.logMessages.length - this.maxMessages);\n\t\t}\n\t}\n\n\t/**\n\t * Gets all messages stored in memory.\n\t *\n\t * @return stored messages\n\t */\n\tpublic getLogMessages(): LogMessage[] {\n\t\treturn this.logMessages;\n\t}\n\n\t/**\n\t * Remove all messages stored in memory.\n\t */\n\tpublic removeLogMessages(): void {\n\t\tthis.logMessages.splice(0);\n\t}\n\n\t/**\n\t * Registers a callback which will be called every time a new message is appended.\n\t * This could be useful if you want to show new messages in realtime.\n\t *\n\t * @param callback callback to be called\n\t */\n\tpublic setOnLogMessagesChangedCallback(callback: (message: LogMessage) => void): void {\n\t\tthis.onLogMessagesChangedCallback = callback;\n\t}\n}\n","import { EventEmitter, Injectable, Optional } from \"@angular/core\";\n\nimport * as log4javascript from \"log4javascript\";\n\nimport { AjaxAppender } from \"./ajax-appender.model\";\nimport { LocalStorageAppender } from \"./local-storage-appender.model\";\nimport { LogLevelConverter } from \"./log-level.converter\";\nimport { LogMessage } from \"./log-message.model\";\nimport { Logger } from \"./logger.model\";\nimport { LoggingServiceConfiguration } from \"./logging-service.configuration\";\nimport { MemoryAppender } from \"./memory-appender.model\";\n\n/**\n * Service for logging functionality.\n *\n * By default, the following settings are used:\n * - logger: root with level WARN\n * - appender: BrowserConsoleAppender with threshold DEBUG and MemoryAppender with threshold ALL\n *\n * Via [configure](#configure), it is possible to amend these settings.\n */\n@Injectable({\n\tprovidedIn: \"root\"\n})\nexport class LoggingService {\n\n\t/**\n\t * Event triggered when the log messages got (potentially) change.\n\t * This can happen when:\n\t * - new message was added\n\t * - all message where removed from memory\n\t * - all massages where removed for one spcific LocalStorageAppender\n\t */\n\tpublic logMessagesChanged: EventEmitter<void>;\n\n\t/**\n\t * Event triggered when ajax appender could not send log messages to the server.\n\t *\n\t * @param message error message\n\t */\n\tpublic ajaxAppenderFailed: EventEmitter<string>;\n\n\tprivate memoryAppender: MemoryAppender;\n\tprivate browserConsoleAppender: log4javascript.BrowserConsoleAppender;\n\n\t/**\n\t * Creates a new instance of the service.\n\t */\n\tconstructor() {\n\n\t\t// prevent log4javascript to show alerts on case of errors\n\t\tlog4javascript.logLog.setQuietMode(true);\n\n\t\t// create event emitter\n\t\tthis.logMessagesChanged = new EventEmitter<void>();\n\t\tthis.ajaxAppenderFailed = new EventEmitter<string>();\n\n\t\t// configure appender\n\t\tconst logger = log4javascript.getRootLogger();\n\t\tlogger.setLevel(log4javascript.Level.WARN);\n\n\t\t// browser console appender for debugger\n\t\tthis.browserConsoleAppender = new log4javascript.BrowserConsoleAppender();\n\t\tthis.browserConsoleAppender.setLayout(new log4javascript.PatternLayout(\"%d{HH:mm:ss,SSS} %c %m\"));\n\t\tthis.browserConsoleAppender.setThreshold(log4javascript.Level.ALL);\n\t\tlogger.addAppender(this.browserConsoleAppender);\n\n\t\t// in-memory appender for display on log messages page\n\t\tthis.memoryAppender = new MemoryAppender();\n\t\tthis.memoryAppender.setLayout(new log4javascript.PatternLayout(\"%d{HH:mm:ss,SSS} %c %m\"));\n\t\tthis.memoryAppender.setOnLogMessagesChangedCallback((message) => {\n\t\t\tthis.logMessagesChanged.emit();\n\t\t});\n\t\tlogger.addAppender(this.memoryAppender);\n\n\t\tthis.configure();\n\t}\n\n\t/**\n\t * Configures the logging depending on the given configuration.\n\t *\n\t * @param configuration configuration data.\n\t */\n\tpublic configure(configuration?: LoggingServiceConfiguration): void {\n\n\t\tif (typeof configuration === \"undefined\") {\n\t\t\tconfiguration = {};\n\t\t}\n\n\t\t// set log levels\n\t\tif (typeof configuration.logLevels !== \"undefined\") {\n\t\t\tfor (const level of configuration.logLevels) {\n\t\t\t\tlet logger: log4javascript.Logger;\n\t\t\t\tif (level.loggerName === \"root\") {\n\t\t\t\t\tlogger = log4javascript.getRootLogger();\n\t\t\t\t} else {\n\t\t\t\t\tlogger = log4javascript.getLogger(level.loggerName);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tlogger.setLevel(LogLevelConverter.levelToLog4Javascript(LogLevelConverter.levelFromString(level.logLevel)));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow new Error(`invalid log level ${level.logLevel}`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// configure AjaxAppender\n\t\tif (typeof configuration.ajaxAppender !== \"undefined\") {\n\t\t\tconst ajaxAppender = new AjaxAppender(configuration.ajaxAppender);\n\t\t\tajaxAppender.appenderFailed.subscribe((message: string) => {\n\t\t\t\tthis.ajaxAppenderFailed.emit(message);\n\t\t\t});\n\t\t\tlog4javascript.getRootLogger().addAppender(ajaxAppender);\n\t\t}\n\n\t\t// configure LocalStorageAppender\n\t\tif (typeof configuration.localStorageAppender !== \"undefined\") {\n\t\t\tconst localStorageAppender = new LocalStorageAppender(configuration.localStorageAppender);\n\t\t\tlog4javascript.getRootLogger().addAppender(localStorageAppender);\n\n\t\t\t// ensure that an eventual memoryAppender is behind the localStorageAppender\n\t\t\tconst appenders = new Logger().getInternalLogger().getEffectiveAppenders();\n\t\t\tconst memoryAppender = appenders.find((a) => a.toString() === \"Ionic.Logging.MemoryAppender\") as MemoryAppender;\n\t\t\tif (memoryAppender) {\n\t\t\t\tlog4javascript.getRootLogger().removeAppender(memoryAppender);\n\t\t\t\tlog4javascript.getRootLogger().addAppender(memoryAppender);\n\t\t\t}\n\t\t}\n\n\t\t// configure MemoryAppender\n\t\tif (configuration.memoryAppender) {\n\t\t\tthis.memoryAppender.configure(configuration.memoryAppender);\n\t\t}\n\n\t\t// configure BrowserConsoleAppender\n\t\tif (configuration.browserConsoleAppender) {\n\t\t\tif (configuration.browserConsoleAppender.threshold) {\n\t\t\t\tconst convertedThreshold = LogLevelConverter.levelToLog4Javascript(\n\t\t\t\t\tLogLevelConverter.levelFromString(configuration.browserConsoleAppender.threshold));\n\t\t\t\tthis.browserConsoleAppender.setThreshold(convertedThreshold);\n\t\t\t}\n\t\t}\n\n\t}\n\n\t/**\n\t * Gets the root logger from which all other loggers derive.\n\t *\n\t * @return root logger\n\t */\n\tpublic getRootLogger(): Logger {\n\t\treturn new Logger();\n\t}\n\n\t/**\n\t * Gets a logger with the specified name, creating it if a logger with that name does not already exist.\n\t *\n\t * @param loggerName name of the logger\n\t * @return logger\n\t */\n\tpublic getLogger(loggerName: string): Logger {\n\t\treturn new Logger(loggerName);\n\t}\n\n\t/**\n\t * Gets the last log messages.\n\t *\n\t * The log messages are retrieved from the internal [MemoryAppender](../memoryappender.html).\n\t * That means you will get only the most current messages. The number of the messages is limited\n\t * by its maxMessages value.\n\t *\n\t * @return log messages\n\t */\n\tpublic getLogMessages(): LogMessage[] {\n\t\treturn this.memoryAppender.getLogMessages();\n\t}\n\n\t/**\n\t * Loads the log messages written by the LocalStorageAppender with the given key.\n\t *\n\t * @param localStorageKey key for the local storage\n\t * @returns log messages\n\t */\n\tpublic getLogMessagesFromLocalStorage(localStorageKey: string): LogMessage[] {\n\t\treturn LocalStorageAppender.loadLogMessages(localStorageKey);\n\t}\n\n\t/**\n\t * Remove all log messages.\n\t */\n\tpublic removeLogMessages(): void {\n\t\tthis.memoryAppender.removeLogMessages();\n\t\tthis.logMessagesChanged.emit();\n\t}\n\n\t/**\n\t * Removes the log messages written by the LocalStorageAppender with the given key.\n\t *\n\t * @param localStorageKey key for the local storage\n\t */\n\tpublic removeLogMessagesFromLocalStorage(localStorageKey: string): void {\n\t\tLocalStorageAppender.removeLogMessages(localStorageKey);\n\t\tthis.logMessagesChanged.emit();\n\t}\n}\n","import { NgModule } from \"@angular/core\";\n\n@NgModule({\n\timports: [\n\t],\n\tdeclarations: [\n\t],\n\texports: [\n\t]\n})\nexport class LoggingServiceModule { }\n","/*\n * Public API Surface of ionic-logging-service.\n */\n\nexport * from \"./lib/ajax-appender.configuration\";\nexport * from \"./lib/ajax-appender.model\";\nexport * from \"./lib/browser-console-appender.configuration\";\nexport * from \"./lib/local-storage-appender.configuration\";\nexport * from \"./lib/local-storage-appender.model\";\nexport * from \"./lib/log-level.converter\";\nexport * from \"./lib/log-level.model\";\nexport * from \"./lib/log-message.model\";\nexport * from \"./lib/logger.model\";\nexport * from \"./lib/logging.service\";\nexport * from \"./lib/logging-service.configuration\";\nexport * from \"./lib/logging-service.module\";\nexport * from \"./lib/memory-appender.configuration\";\nexport * from \"./lib/memory-appender.model\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_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UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFd,MAAM,EAAA,CAAA,CAAA;2FAEN,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACX,oBAAA,UAAU,EAAE,MAAM;AAClB,iBAAA,CAAA;;;MCbY,oBAAoB,CAAA;;iHAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kHAApB,oBAAoB,EAAA,CAAA,CAAA;kHAApB,oBAAoB,EAAA,CAAA,CAAA;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBARhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,EACR;AACD,oBAAA,YAAY,EAAE,EACb;AACD,oBAAA,OAAO,EAAE,EACR;AACD,iBAAA,CAAA;;;ACTD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ionic-logging-service.mjs","sources":["../../../projects/ionic-logging-service/src/lib/json-layout.model.ts","../../../projects/ionic-logging-service/src/lib/log-level.model.ts","../../../projects/ionic-logging-service/src/lib/log-level.converter.ts","../../../projects/ionic-logging-service/src/lib/ajax-appender.model.ts","../../../projects/ionic-logging-service/src/lib/local-storage-appender.model.ts","../../../projects/ionic-logging-service/src/lib/logger.model.ts","../../../projects/ionic-logging-service/src/lib/memory-appender.model.ts","../../../projects/ionic-logging-service/src/lib/logging.service.ts","../../../projects/ionic-logging-service/src/lib/logging-service.module.ts","../../../projects/ionic-logging-service/src/public_api.ts","../../../projects/ionic-logging-service/src/ionic-logging-service.ts"],"sourcesContent":["import * as log4javascript from \"log4javascript\";\nimport { LoggingEvent } from \"log4javascript\";\n\n/**\n * Formats a logging event into JavaScript Object Notation (JSON).\n * The implemenatation is mainly the same as with log4javascript.JsonLayout,\n * with an improvement of serializing messages containing '\\\"'.\"\n */\nexport class JsonLayout extends log4javascript.JsonLayout {\n\n\t/**\n\t * Formats the log message.\n\t */\n\tpublic format(loggingEvent: LoggingEvent): string {\n\t\tconst eventObj = {\n\t\t\tlogger: loggingEvent.logger.name,\n\t\t\ttimestamp: loggingEvent.timeStampInMilliseconds,\n\t\t\tlevel: loggingEvent.level.toString(),\n\t\t\turl: window.location.href,\n\t\t\tmessage: this.isCombinedMessages() ? loggingEvent.getCombinedMessages() : loggingEvent.messages\n\t\t};\n\t\treturn JSON.stringify(eventObj);\n\t}\n\n\t/**\n\t * Gets the layout's name.\n\t * Mainly for unit testing purposes.\n\t *\n\t * @return layout's name\n\t */\n\tpublic toString(): string {\n\t\treturn \"Ionic.Logging.JsonLayout\";\n\t}\n}\n","/**\n * Logging levels.\n */\nexport enum LogLevel {\n\t/**\n\t * All events should be logged.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tALL,\n\n\t/**\n\t * A fine-grained debug message, typically capturing the flow through the application.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tTRACE,\n\n\t/**\n\t * A general debugging event.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tDEBUG,\n\n\t/**\n\t * An event for informational purposes.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tINFO,\n\n\t/**\n\t * An event that might possible lead to an error.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tWARN,\n\n\t/**\n\t * An error in the application, possibly recoverable.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tERROR,\n\n\t/**\n\t * A severe error that will prevent the application from continuing.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tFATAL,\n\n\t/**\n\t * No events will be logged.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tOFF,\n}\n","import * as log4javascript from \"log4javascript\";\n\nimport { LogLevel } from \"./log-level.model\";\n\n/**\n * Helper class for converting log levels from and to different data type.\n */\nexport class LogLevelConverter {\n\n\t/**\n\t * Converts log4javascript.Level to internal LogLevel.\n\t *\n\t * @param level log4javascript's data type\n\t * @return internal data type.\n\t */\n\tpublic static levelFromLog4Javascript(level: log4javascript.Level): LogLevel {\n\t\tswitch (level) {\n\t\t\tcase log4javascript.Level.ALL:\n\t\t\t\treturn LogLevel.ALL;\n\t\t\tcase log4javascript.Level.DEBUG:\n\t\t\t\treturn LogLevel.DEBUG;\n\t\t\tcase log4javascript.Level.ERROR:\n\t\t\t\treturn LogLevel.ERROR;\n\t\t\tcase log4javascript.Level.FATAL:\n\t\t\t\treturn LogLevel.FATAL;\n\t\t\tcase log4javascript.Level.INFO:\n\t\t\t\treturn LogLevel.INFO;\n\t\t\tcase log4javascript.Level.OFF:\n\t\t\t\treturn LogLevel.OFF;\n\t\t\tcase log4javascript.Level.TRACE:\n\t\t\t\treturn LogLevel.TRACE;\n\t\t\tcase log4javascript.Level.WARN:\n\t\t\t\treturn LogLevel.WARN;\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`invalid level ${level}`);\n\t\t}\n\t}\n\n\t/**\n\t * Converts string representation to internal LogLevel.\n\t *\n\t * @param level string representation\n\t * @return internal data type.\n\t */\n\tpublic static levelFromString(level: string): LogLevel {\n\t\tswitch (level) {\n\t\t\tcase \"ALL\":\n\t\t\t\treturn LogLevel.ALL;\n\t\t\tcase \"DEBUG\":\n\t\t\t\treturn LogLevel.DEBUG;\n\t\t\tcase \"ERROR\":\n\t\t\t\treturn LogLevel.ERROR;\n\t\t\tcase \"FATAL\":\n\t\t\t\treturn LogLevel.FATAL;\n\t\t\tcase \"INFO\":\n\t\t\t\treturn LogLevel.INFO;\n\t\t\tcase \"OFF\":\n\t\t\t\treturn LogLevel.OFF;\n\t\t\tcase \"TRACE\":\n\t\t\t\treturn LogLevel.TRACE;\n\t\t\tcase \"WARN\":\n\t\t\t\treturn LogLevel.WARN;\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`invalid level ${level}`);\n\t\t}\n\t}\n\n\t/**\n\t * Converts internal LogLevel to log4javascript.Level.\n\t *\n\t * @param internal data type.\n\t * @return level log4javascript's data type\n\t */\n\tpublic static levelToLog4Javascript(level: LogLevel): log4javascript.Level {\n\t\tswitch (level) {\n\t\t\tcase LogLevel.ALL:\n\t\t\t\treturn log4javascript.Level.ALL;\n\t\t\tcase LogLevel.DEBUG:\n\t\t\t\treturn log4javascript.Level.DEBUG;\n\t\t\tcase LogLevel.ERROR:\n\t\t\t\treturn log4javascript.Level.ERROR;\n\t\t\tcase LogLevel.FATAL:\n\t\t\t\treturn log4javascript.Level.FATAL;\n\t\t\tcase LogLevel.INFO:\n\t\t\t\treturn log4javascript.Level.INFO;\n\t\t\tcase LogLevel.OFF:\n\t\t\t\treturn log4javascript.Level.OFF;\n\t\t\tcase LogLevel.TRACE:\n\t\t\t\treturn log4javascript.Level.TRACE;\n\t\t\tcase LogLevel.WARN:\n\t\t\t\treturn log4javascript.Level.WARN;\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`invalid level ${level}`);\n\t\t}\n\t}\n}\n","import { EventEmitter } from \"@angular/core\";\n\nimport * as log4javascript from \"log4javascript\";\n\nimport { AjaxAppenderConfiguration } from \"./ajax-appender.configuration\";\nimport { JsonLayout } from \"./json-layout.model\";\nimport { LogLevelConverter } from \"./log-level.converter\";\n\n/**\n * An appender which sends the log messages to a server via HTTP.\n *\n * A typical configuration could be:\n *\n * ```json\n * {\n * \"url\": \"https://my.backend.xy/LoggingBackend\",\n * \"batchSize\": 10,\n * \"timerInterval\": 60000,\n * \"threshold\": \"INFO\"\n * }\n * ```\n */\nexport class AjaxAppender extends log4javascript.Appender {\n\n\tprivate static batchSizeDefault = 1;\n\tprivate static timerIntervalDefault = 0;\n\tprivate static thresholdDefault = \"WARN\";\n\n\t/**\n\t * Event triggered when the appender could not send log messages to the server.\n\t *\n\t * @param message error message\n\t */\n\tpublic appenderFailed: EventEmitter<string>;\n\n\tprivate ajaxAppender: log4javascript.AjaxAppender;\n\tprivate url: string;\n\tprivate withCredentials: boolean;\n\n\t/**\n\t * Creates a new instance of the appender.\n\t *\n\t * @param configuration configuration for the appender.\n\t */\n\tconstructor(configuration: AjaxAppenderConfiguration) {\n\t\tsuper();\n\n\t\tif (!configuration) {\n\t\t\tthrow new Error(\"configuration must be not empty\");\n\t\t}\n\t\tif (!configuration.url) {\n\t\t\tthrow new Error(\"url must be not empty\");\n\t\t}\n\t\tthis.ajaxAppender = new log4javascript.AjaxAppender(configuration.url, configuration.withCredentials);\n\t\tthis.url = configuration.url;\n\t\tthis.withCredentials = configuration.withCredentials;\n\n\t\tthis.ajaxAppender.setLayout(new JsonLayout(false, false));\n\t\tthis.ajaxAppender.addHeader(\"Content-Type\", \"application/json; charset=utf-8\");\n\t\tthis.ajaxAppender.setSendAllOnUnload(true);\n\n\t\tthis.appenderFailed = new EventEmitter<string>();\n\t\tthis.ajaxAppender.setFailCallback((message: any) => {\n\t\t\tthis.appenderFailed.emit(message);\n\t\t});\n\n\t\t// process remaining configuration\n\t\tthis.configure({\n\t\t\tbatchSize: configuration.batchSize || AjaxAppender.batchSizeDefault,\n\t\t\tthreshold: configuration.threshold || AjaxAppender.thresholdDefault,\n\t\t\ttimerInterval: configuration.timerInterval || AjaxAppender.timerIntervalDefault,\n\t\t\turl: configuration.url,\n\t\t\twithCredentials: configuration.withCredentials\n\t\t});\n\n\t}\n\n\t/**\n\t * Configures the logging depending on the given configuration.\n\t *\n\t * Only the defined properties get overwritten.\n\t * Neither url nor withCredentials can be modified.\n\t *\n\t * @param configuration configuration data.\n\t */\n\tpublic configure(configuration: AjaxAppenderConfiguration): void {\n\t\tif (configuration) {\n\t\t\tif (configuration.url && configuration.url !== this.url) {\n\t\t\t\tthrow new Error(\"url must not be changed\");\n\t\t\t}\n\t\t\tif (configuration.withCredentials && configuration.withCredentials !== this.withCredentials) {\n\t\t\t\tthrow new Error(\"withCredentials must not be changed\");\n\t\t\t}\n\t\t\tif (configuration.batchSize) {\n\t\t\t\tthis.setBatchSize(configuration.batchSize);\n\t\t\t}\n\t\t\tif (typeof configuration.timerInterval === \"number\") {\n\t\t\t\tthis.setTimerInterval(configuration.timerInterval);\n\t\t\t}\n\t\t\tif (configuration.threshold) {\n\t\t\t\tconst convertedThreshold = LogLevelConverter.levelToLog4Javascript(\n\t\t\t\t\tLogLevelConverter.levelFromString(configuration.threshold));\n\t\t\t\tthis.setThreshold(convertedThreshold);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Appender-specific method to append a log message.\n\t *\n\t * @param loggingEvent event to be appended.\n\t */\n\tpublic append(loggingEvent: log4javascript.LoggingEvent): void {\n\t\tthis.ajaxAppender.append(loggingEvent);\n\t}\n\n\t/**\n\t * Gets the appender's name.\n\t * Mainly for unit testing purposes.\n\t *\n\t * @return appender's name\n\t */\n\tpublic toString(): string {\n\t\treturn \"Ionic.Logging.AjaxAppender\";\n\t}\n\n\t/**\n\t * Get the internally used appender.\n\t * Mainly for unit testing purposes.\n\t */\n\tpublic getInternalAppender(): log4javascript.AjaxAppender {\n\t\treturn this.ajaxAppender;\n\t}\n\n\t/**\n\t * Returns the number of log messages sent in each request.\n\t */\n\tpublic getBatchSize(): number {\n\t\treturn this.ajaxAppender.getBatchSize();\n\t}\n\n\t/**\n\t * Sets the number of log messages to send in each request.\n\t *\n\t * @param batchSize new batch size\n\t */\n\tpublic setBatchSize(batchSize: number): void {\n\t\tthis.ajaxAppender.setBatchSize(batchSize);\n\t}\n\n\t/**\n\t * Returns the appender's layout.\n\t */\n\tpublic getLayout(): log4javascript.Layout {\n\t\treturn this.ajaxAppender.getLayout();\n\t}\n\n\t/**\n\t * Sets the appender's layout.\n\t */\n\tpublic setLayout(layout: log4javascript.Layout): void {\n\t\tthis.ajaxAppender.setLayout(layout);\n\t}\n\n\t/**\n\t * Returns the length of time in milliseconds between each sending of queued log messages.\n\t */\n\tpublic getTimerInterval(): number {\n\t\treturn this.ajaxAppender.getTimerInterval();\n\t}\n\n\t/**\n\t * Sets the length of time in milliseconds between each sending of queued log messages.\n\t *\n\t * @param timerInterval new timer interval\n\t */\n\tpublic setTimerInterval(timerInterval: number): void {\n\t\tthis.ajaxAppender.setTimed(timerInterval > 0);\n\t\tthis.ajaxAppender.setTimerInterval(timerInterval);\n\t}\n}\n","import * as log4javascript from \"log4javascript\";\n\nimport { LocalStorageAppenderConfiguration } from \"./local-storage-appender.configuration\";\nimport { LogLevelConverter } from \"./log-level.converter\";\nimport { LogLevel } from \"./log-level.model\";\nimport { LogMessage } from \"./log-message.model\";\n\n/**\n * An appender which stores the log messages in the browser's local storage.\n *\n * The messages are saved JSON-serialized.\n * You have to configure which key is used for storing the messages.\n *\n * A typical configuration could be:\n *\n * ```json\n * {\n * \"localStorageKey\": \"myLogs\",\n * \"maxMessages\": 500,\n * \"threshold\": \"INFO\"\n * }\n * ```\n */\nexport class LocalStorageAppender extends log4javascript.Appender {\n\n\tprivate static maxMessagesDefault = 250;\n\tprivate static thresholdDefault = \"WARN\";\n\n\tprivate maxMessages: number;\n\n\tprivate localStorageKey: string;\n\tprivate logMessages: LogMessage[];\n\n\t/**\n\t * Creates a new instance of the appender.\n\t *\n\t * @param configuration configuration for the appender.\n\t */\n\tconstructor(configuration: LocalStorageAppenderConfiguration) {\n\t\tsuper();\n\n\t\tif (!configuration) {\n\t\t\tthrow new Error(\"configuration must be not empty\");\n\t\t}\n\t\tif (!configuration.localStorageKey || configuration.localStorageKey === \"\") {\n\t\t\tthrow new Error(\"localStorageKey must be not empty\");\n\t\t}\n\t\tthis.localStorageKey = configuration.localStorageKey;\n\n\t\t// read existing logMessages\n\t\tthis.logMessages = LocalStorageAppender.loadLogMessages(this.localStorageKey);\n\n\t\t// process remaining configuration\n\t\tthis.configure({\n\t\t\tlocalStorageKey: configuration.localStorageKey,\n\t\t\tmaxMessages: configuration.maxMessages || LocalStorageAppender.maxMessagesDefault,\n\t\t\tthreshold: configuration.threshold || LocalStorageAppender.thresholdDefault,\n\t\t});\n\t}\n\n\t/**\n\t * Load log messages from local storage which are stored there under the given key.\n\t *\n\t * @param localStorageKey local storage key\n\t * @return stored messages\n\t */\n\tpublic static loadLogMessages(localStorageKey: string): LogMessage[] {\n\t\tlet logMessages: LogMessage[];\n\n\t\tif (!localStorageKey || localStorage.getItem(localStorageKey) === null) {\n\t\t\tlogMessages = [];\n\t\t} else {\n\t\t\tlogMessages = JSON.parse(localStorage.getItem(localStorageKey));\n\t\t\tfor (const logMessage of logMessages) {\n\t\t\t\t// timestamps are serialized as strings\n\t\t\t\tlogMessage.timeStamp = new Date(logMessage.timeStamp);\n\t\t\t}\n\t\t}\n\n\t\treturn logMessages;\n\t}\n\n\t/**\n\t * Remove log messages from local storage which are stored there under the given key.\n\t *\n\t * @param localStorageKey local storage key\n\t */\n\tpublic static removeLogMessages(localStorageKey: string): void {\n\t\tlocalStorage.removeItem(localStorageKey);\n\t}\n\n\t/**\n\t * Configures the logging depending on the given configuration.\n\t *\n\t * Only the defined properties get overwritten.\n\t * The localStorageKey cannot be modified.\n\t *\n\t * @param configuration configuration data.\n\t */\n\tpublic configure(configuration: LocalStorageAppenderConfiguration): void {\n\t\tif (configuration) {\n\t\t\tif (configuration.localStorageKey && configuration.localStorageKey !== this.localStorageKey) {\n\t\t\t\tthrow new Error(\"localStorageKey must not be changed\");\n\t\t\t}\n\t\t\tif (configuration.maxMessages) {\n\t\t\t\tthis.setMaxMessages(configuration.maxMessages);\n\t\t\t}\n\t\t\tif (configuration.threshold) {\n\t\t\t\tconst convertedThreshold = LogLevelConverter.levelToLog4Javascript(\n\t\t\t\t\tLogLevelConverter.levelFromString(configuration.threshold));\n\t\t\t\tthis.setThreshold(convertedThreshold);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Appender-specific method to append a log message.\n\t *\n\t * @param loggingEvent event to be appended.\n\t */\n\tpublic append(loggingEvent: log4javascript.LoggingEvent): void {\n\t\t// if logMessages is already full, remove oldest element\n\t\twhile (this.logMessages.length >= this.maxMessages) {\n\t\t\tthis.logMessages.shift();\n\t\t}\n\t\t// add event to logMessages\n\t\tconst message: LogMessage = {\n\t\t\tlevel: LogLevel[LogLevelConverter.levelFromLog4Javascript(loggingEvent.level)],\n\t\t\tlogger: typeof loggingEvent.logger !== \"undefined\" ? loggingEvent.logger.name : undefined,\n\t\t\tmessage: loggingEvent.messages.slice(1),\n\t\t\tmethodName: loggingEvent.messages[0],\n\t\t\ttimeStamp: loggingEvent.timeStamp,\n\t\t};\n\t\tthis.logMessages.push(message);\n\n\t\t// write values to localStorage\n\t\tlocalStorage.setItem(this.localStorageKey, JSON.stringify(this.logMessages));\n\t}\n\n\t/**\n\t * Gets the appender's name.\n\t * Mainly for unit testing purposes.\n\t *\n\t * @return appender's name\n\t */\n\tpublic toString(): string {\n\t\treturn \"Ionic.Logging.LocalStorageAppender\";\n\t}\n\n\t/**\n\t * Get the key which is used to store the messages in the local storage.\n\t */\n\tpublic getLocalStorageKey(): string {\n\t\treturn this.localStorageKey;\n\t}\n\n\t/**\n\t * Get the maximum number of messages which will be stored in local storage.\n\t */\n\tpublic getMaxMessages(): number {\n\t\treturn this.maxMessages;\n\t}\n\n\t/**\n\t * Set the maximum number of messages which will be stored in local storage.\n\t *\n\t * If the appender stores currently more messages than the new value allows, the oldest messages get removed.\n\t *\n\t * @param value new maximum number\n\t */\n\tpublic setMaxMessages(value: number): void {\n\t\tif (this.maxMessages !== value) {\n\t\t\tthis.maxMessages = value;\n\n\t\t\tif (this.logMessages.length > this.maxMessages) {\n\t\t\t\t// there are too much logMessages for the new value, therefore remove oldest messages\n\t\t\t\twhile (this.logMessages.length > this.maxMessages) {\n\t\t\t\t\tthis.logMessages.shift();\n\t\t\t\t}\n\n\t\t\t\t// write values to localStorage\n\t\t\t\tlocalStorage.setItem(this.localStorageKey, JSON.stringify(this.logMessages));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Gets all messages stored in local storage.\n\t * Mainly for unit testing purposes.\n\t *\n\t * @return stored messages\n\t */\n\tpublic getLogMessages(): LogMessage[] {\n\t\treturn this.logMessages;\n\t}\n\n\t/**\n\t * Removes all messages from local storage.\n\t * Mainly for unit testing purposes.\n\t */\n\tpublic clearLog(): void {\n\t\tthis.logMessages = [];\n\t\tlocalStorage.removeItem(this.localStorageKey);\n\t}\n}\n","import * as log4javascript from \"log4javascript\";\n\nimport { LogLevelConverter } from \"./log-level.converter\";\nimport { LogLevel } from \"./log-level.model\";\n\n/**\n * Logger for writing log messages.\n */\nexport class Logger {\n\n\tprivate logger: log4javascript.Logger;\n\n\t/**\n\t * Creates a new instance of a logger.\n\t */\n\tconstructor(logger?: string | any) {\n\t\tif (typeof logger === \"undefined\") {\n\t\t\tthis.logger = log4javascript.getRootLogger();\n\t\t} else if (typeof logger === \"string\") {\n\t\t\tthis.logger = log4javascript.getLogger(logger);\n\t\t} else {\n\t\t\tthis.logger = logger;\n\t\t}\n\t}\n\n\t/**\n\t * Get the log level.\n\t */\n\tpublic getLogLevel(): LogLevel {\n\t\treturn LogLevelConverter.levelFromLog4Javascript(this.logger.getLevel());\n\t}\n\n\t/**\n\t * Set the log level.\n\t *\n\t * @param level the new log level\n\t */\n\tpublic setLogLevel(level: LogLevel): void {\n\t\tthis.logger.setLevel(LogLevelConverter.levelToLog4Javascript(level));\n\t}\n\n\t/**\n\t * Logs a message at level TRACE.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic trace(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isTraceEnabled()) {\n\t\t\tconst args = [methodName];\n\t\t\tfor (const param of params) {\n\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t}\n\t\t\tthis.logger.trace.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs a message at level DEBUG.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic debug(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isDebugEnabled()) {\n\t\t\tconst args = [methodName];\n\t\t\tfor (const param of params) {\n\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t}\n\t\t\tthis.logger.debug.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs a message at level INFO.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic info(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isInfoEnabled()) {\n\t\t\tconst args = [methodName];\n\t\t\tfor (const param of params) {\n\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t}\n\t\t\tthis.logger.info.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs a message at level WARN.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic warn(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isWarnEnabled()) {\n\t\t\tconst args = [methodName];\n\t\t\tfor (const param of params) {\n\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t}\n\t\t\tthis.logger.warn.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs a message at level ERROR.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic error(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isErrorEnabled()) {\n\t\t\tconst args = [methodName];\n\t\t\tfor (const param of params) {\n\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t}\n\t\t\tthis.logger.error.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs a message at level FATAL.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic fatal(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isFatalEnabled()) {\n\t\t\tconst args = [methodName];\n\t\t\tfor (const param of params) {\n\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t}\n\t\t\tthis.logger.fatal.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs the entry into a method.\n\t * The method name will be logged at level INFO, the parameters at level DEBUG.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic entry(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isInfoEnabled()) {\n\t\t\tconst args = [methodName, \"entry\"];\n\t\t\tif (this.logger.isDebugEnabled()) {\n\t\t\t\tfor (const param of params) {\n\t\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.logger.info.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Logs the exit of a method.\n\t * The method name will be logged at level INFO, the parameters at level DEBUG.\n\t *\n\t * @param methodName name of the method\n\t * @param params optional parameters to be logged; objects will be formatted as JSON\n\t */\n\tpublic exit(methodName: string, ...params: any[]): void {\n\t\tif (this.logger.isInfoEnabled()) {\n\t\t\tconst args = [methodName, \"exit\"];\n\t\t\tif (this.logger.isDebugEnabled()) {\n\t\t\t\tfor (const param of params) {\n\t\t\t\t\targs.push(this.formatArgument(param));\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.logger.info.apply(this.logger, args);\n\t\t}\n\t}\n\n\t/**\n\t * Formats the given argument.\n\t */\n\tpublic formatArgument(arg: any): string {\n\t\tif (typeof arg === \"string\") {\n\t\t\treturn arg;\n\t\t} else if (typeof arg === \"number\") {\n\t\t\treturn arg.toString();\n\t\t} else if (arg instanceof Error) {\n\t\t\t// JSON.stringify() returns here \"{ }\"\n\t\t\treturn arg.toString();\n\t\t} else {\n\t\t\ttry {\n\t\t\t\treturn JSON.stringify(arg);\n\t\t\t} catch (e) {\n\t\t\t\treturn e.message;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns the internal Logger (for unit tests only).\n\t */\n\tpublic getInternalLogger(): log4javascript.Logger {\n\t\treturn this.logger;\n\t}\n}\n","import * as log4javascript from \"log4javascript\";\n\nimport { LogLevelConverter } from \"./log-level.converter\";\nimport { LogLevel } from \"./log-level.model\";\nimport { LogMessage } from \"./log-message.model\";\nimport { MemoryAppenderConfiguration } from \"./memory-appender.configuration\";\n\n/**\n * An appender which stores the log messages in the browser's memory.\n *\n * The MemoryAppender is enabled by default.\n * If you do not specify anything else, it is using this configuration:\n *\n * ```JSON\n * {\n * \"memoryAppender\": [\n * {\n * \"maxMessages\": 250,\n * \"threshold\": \"ALL\"\n * }\n * }\n * ```\n */\nexport class MemoryAppender extends log4javascript.Appender {\n\n\tprivate static maxMessagesDefault = 250;\n\tprivate static thresholdDefault = \"ALL\";\n\n\tprivate maxMessages: number;\n\n\tprivate logMessages: LogMessage[];\n\tprivate onLogMessagesChangedCallback: (message: LogMessage) => void;\n\n\t/**\n\t * Creates a new instance of the appender.\n\t *\n\t * @param configuration configuration for the appender.\n\t */\n\tconstructor(configuration?: MemoryAppenderConfiguration) {\n\t\tsuper();\n\n\t\tthis.logMessages = [];\n\n\t\t// process configuration\n\t\tconfiguration = configuration || {};\n\t\tthis.configure({\n\t\t\tmaxMessages: configuration.maxMessages || MemoryAppender.maxMessagesDefault,\n\t\t\tthreshold: configuration.threshold || MemoryAppender.thresholdDefault,\n\t\t});\n\n\t\tthis.maxMessages = MemoryAppender.maxMessagesDefault;\n\t}\n\n\t/**\n\t * Configures the logging depending on the given configuration.\n\t * Only the defined properties get overwritten.\n\t *\n\t * @param configuration configuration data.\n\t */\n\tpublic configure(configuration: MemoryAppenderConfiguration): void {\n\t\tif (configuration) {\n\t\t\tif (configuration.maxMessages) {\n\t\t\t\tthis.setMaxMessages(configuration.maxMessages);\n\t\t\t}\n\t\t\tif (configuration.threshold) {\n\t\t\t\tconst convertedThreshold = LogLevelConverter.levelToLog4Javascript(\n\t\t\t\t\tLogLevelConverter.levelFromString(configuration.threshold));\n\t\t\t\tthis.setThreshold(convertedThreshold);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Appender-specific method to append a log message.\n\t *\n\t * @param loggingEvent event to be appended.\n\t */\n\tpublic append(loggingEvent: log4javascript.LoggingEvent): void {\n\t\t// if logMessages is already full, remove oldest element\n\t\twhile (this.logMessages.length >= this.maxMessages) {\n\t\t\tthis.logMessages.shift();\n\t\t}\n\t\t// add event to logMessages\n\t\tconst message: LogMessage = {\n\t\t\tlevel: LogLevel[LogLevelConverter.levelFromLog4Javascript(loggingEvent.level)],\n\t\t\tlogger: typeof loggingEvent.logger === \"object\" ? loggingEvent.logger.name : undefined,\n\t\t\tmessage: loggingEvent.messages.slice(1),\n\t\t\tmethodName: loggingEvent.messages[0],\n\t\t\ttimeStamp: loggingEvent.timeStamp,\n\t\t};\n\t\tthis.logMessages.push(message);\n\n\t\t// inform about new message\n\t\tif (typeof this.onLogMessagesChangedCallback === \"function\") {\n\t\t\tthis.onLogMessagesChangedCallback(message);\n\t\t}\n\t}\n\n\t/**\n\t * Gets the appender's name.\n\t * Mainly for unit testing purposes.\n\t *\n\t * @return appender's name\n\t */\n\tpublic toString(): string {\n\t\treturn \"Ionic.Logging.MemoryAppender\";\n\t}\n\n\t/**\n\t * Get the maximum number of messages which will be stored in memory.\n\t */\n\tpublic getMaxMessages(): number {\n\t\treturn this.maxMessages;\n\t}\n\n\t/**\n\t * Set the maximum number of messages which will be stored in memory.\n\t *\n\t * If the appender stores currently more messages than the new value allows, the oldest messages get removed.\n\t *\n\t * @param value new maximum number\n\t */\n\tpublic setMaxMessages(value: number): void {\n\t\tthis.maxMessages = value;\n\n\t\t// if there are too much logMessages for the new value, remove oldest messages\n\t\tif (this.logMessages.length > this.maxMessages) {\n\t\t\tthis.logMessages.splice(0, this.logMessages.length - this.maxMessages);\n\t\t}\n\t}\n\n\t/**\n\t * Gets all messages stored in memory.\n\t *\n\t * @return stored messages\n\t */\n\tpublic getLogMessages(): LogMessage[] {\n\t\treturn this.logMessages;\n\t}\n\n\t/**\n\t * Remove all messages stored in memory.\n\t */\n\tpublic removeLogMessages(): void {\n\t\tthis.logMessages.splice(0);\n\t}\n\n\t/**\n\t * Registers a callback which will be called every time a new message is appended.\n\t * This could be useful if you want to show new messages in realtime.\n\t *\n\t * @param callback callback to be called\n\t */\n\tpublic setOnLogMessagesChangedCallback(callback: (message: LogMessage) => void): void {\n\t\tthis.onLogMessagesChangedCallback = callback;\n\t}\n}\n","import { EventEmitter, Injectable, Optional } from \"@angular/core\";\n\nimport * as log4javascript from \"log4javascript\";\n\nimport { AjaxAppender } from \"./ajax-appender.model\";\nimport { LocalStorageAppender } from \"./local-storage-appender.model\";\nimport { LogLevelConverter } from \"./log-level.converter\";\nimport { LogMessage } from \"./log-message.model\";\nimport { Logger } from \"./logger.model\";\nimport { LoggingServiceConfiguration } from \"./logging-service.configuration\";\nimport { MemoryAppender } from \"./memory-appender.model\";\n\n/**\n * Service for logging functionality.\n *\n * By default, the following settings are used:\n * - logger: root with level WARN\n * - appender: BrowserConsoleAppender with threshold DEBUG and MemoryAppender with threshold ALL\n *\n * Via [configure](#configure), it is possible to amend these settings.\n */\n@Injectable({\n\tprovidedIn: \"root\"\n})\nexport class LoggingService {\n\n\t/**\n\t * Event triggered when the log messages got (potentially) change.\n\t * This can happen when:\n\t * - new message was added\n\t * - all message where removed from memory\n\t * - all massages where removed for one spcific LocalStorageAppender\n\t */\n\tpublic logMessagesChanged: EventEmitter<void>;\n\n\t/**\n\t * Event triggered when ajax appender could not send log messages to the server.\n\t *\n\t * @param message error message\n\t */\n\tpublic ajaxAppenderFailed: EventEmitter<string>;\n\n\tprivate memoryAppender: MemoryAppender;\n\tprivate browserConsoleAppender: log4javascript.BrowserConsoleAppender;\n\n\t/**\n\t * Creates a new instance of the service.\n\t */\n\tconstructor() {\n\n\t\t// prevent log4javascript to show alerts on case of errors\n\t\tlog4javascript.logLog.setQuietMode(true);\n\n\t\t// create event emitter\n\t\tthis.logMessagesChanged = new EventEmitter<void>();\n\t\tthis.ajaxAppenderFailed = new EventEmitter<string>();\n\n\t\t// configure appender\n\t\tconst logger = log4javascript.getRootLogger();\n\t\tlogger.setLevel(log4javascript.Level.WARN);\n\n\t\t// browser console appender for debugger\n\t\tthis.browserConsoleAppender = new log4javascript.BrowserConsoleAppender();\n\t\tthis.browserConsoleAppender.setLayout(new log4javascript.PatternLayout(\"%d{HH:mm:ss,SSS} %c %m\"));\n\t\tthis.browserConsoleAppender.setThreshold(log4javascript.Level.ALL);\n\t\tlogger.addAppender(this.browserConsoleAppender);\n\n\t\t// in-memory appender for display on log messages page\n\t\tthis.memoryAppender = new MemoryAppender();\n\t\tthis.memoryAppender.setLayout(new log4javascript.PatternLayout(\"%d{HH:mm:ss,SSS} %c %m\"));\n\t\tthis.memoryAppender.setOnLogMessagesChangedCallback((message) => {\n\t\t\tthis.logMessagesChanged.emit();\n\t\t});\n\t\tlogger.addAppender(this.memoryAppender);\n\n\t\tthis.configure();\n\t}\n\n\t/**\n\t * Configures the logging depending on the given configuration.\n\t *\n\t * @param configuration configuration data.\n\t */\n\tpublic configure(configuration?: LoggingServiceConfiguration): void {\n\n\t\tif (typeof configuration === \"undefined\") {\n\t\t\tconfiguration = {};\n\t\t}\n\n\t\t// set log levels\n\t\tif (typeof configuration.logLevels !== \"undefined\") {\n\t\t\tfor (const level of configuration.logLevels) {\n\t\t\t\tlet logger: log4javascript.Logger;\n\t\t\t\tif (level.loggerName === \"root\") {\n\t\t\t\t\tlogger = log4javascript.getRootLogger();\n\t\t\t\t} else {\n\t\t\t\t\tlogger = log4javascript.getLogger(level.loggerName);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tlogger.setLevel(LogLevelConverter.levelToLog4Javascript(LogLevelConverter.levelFromString(level.logLevel)));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow new Error(`invalid log level ${level.logLevel}`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// configure AjaxAppender\n\t\tif (typeof configuration.ajaxAppender !== \"undefined\") {\n\t\t\tconst ajaxAppender = new AjaxAppender(configuration.ajaxAppender);\n\t\t\tajaxAppender.appenderFailed.subscribe((message: string) => {\n\t\t\t\tthis.ajaxAppenderFailed.emit(message);\n\t\t\t});\n\t\t\tlog4javascript.getRootLogger().addAppender(ajaxAppender);\n\t\t}\n\n\t\t// configure LocalStorageAppender\n\t\tif (typeof configuration.localStorageAppender !== \"undefined\") {\n\t\t\tconst localStorageAppender = new LocalStorageAppender(configuration.localStorageAppender);\n\t\t\tlog4javascript.getRootLogger().addAppender(localStorageAppender);\n\n\t\t\t// ensure that an eventual memoryAppender is behind the localStorageAppender\n\t\t\tconst appenders = new Logger().getInternalLogger().getEffectiveAppenders();\n\t\t\tconst memoryAppender = appenders.find((a) => a.toString() === \"Ionic.Logging.MemoryAppender\") as MemoryAppender;\n\t\t\tif (memoryAppender) {\n\t\t\t\tlog4javascript.getRootLogger().removeAppender(memoryAppender);\n\t\t\t\tlog4javascript.getRootLogger().addAppender(memoryAppender);\n\t\t\t}\n\t\t}\n\n\t\t// configure MemoryAppender\n\t\tif (configuration.memoryAppender) {\n\t\t\tthis.memoryAppender.configure(configuration.memoryAppender);\n\t\t}\n\n\t\t// configure BrowserConsoleAppender\n\t\tif (configuration.browserConsoleAppender) {\n\t\t\tif (configuration.browserConsoleAppender.threshold) {\n\t\t\t\tconst convertedThreshold = LogLevelConverter.levelToLog4Javascript(\n\t\t\t\t\tLogLevelConverter.levelFromString(configuration.browserConsoleAppender.threshold));\n\t\t\t\tthis.browserConsoleAppender.setThreshold(convertedThreshold);\n\t\t\t}\n\t\t}\n\n\t}\n\n\t/**\n\t * Gets the root logger from which all other loggers derive.\n\t *\n\t * @return root logger\n\t */\n\tpublic getRootLogger(): Logger {\n\t\treturn new Logger();\n\t}\n\n\t/**\n\t * Gets a logger with the specified name, creating it if a logger with that name does not already exist.\n\t *\n\t * @param loggerName name of the logger\n\t * @return logger\n\t */\n\tpublic getLogger(loggerName: string): Logger {\n\t\treturn new Logger(loggerName);\n\t}\n\n\t/**\n\t * Gets the last log messages.\n\t *\n\t * The log messages are retrieved from the internal [MemoryAppender](../memoryappender.html).\n\t * That means you will get only the most current messages. The number of the messages is limited\n\t * by its maxMessages value.\n\t *\n\t * @return log messages\n\t */\n\tpublic getLogMessages(): LogMessage[] {\n\t\treturn this.memoryAppender.getLogMessages();\n\t}\n\n\t/**\n\t * Loads the log messages written by the LocalStorageAppender with the given key.\n\t *\n\t * @param localStorageKey key for the local storage\n\t * @returns log messages\n\t */\n\tpublic getLogMessagesFromLocalStorage(localStorageKey: string): LogMessage[] {\n\t\treturn LocalStorageAppender.loadLogMessages(localStorageKey);\n\t}\n\n\t/**\n\t * Remove all log messages.\n\t */\n\tpublic removeLogMessages(): void {\n\t\tthis.memoryAppender.removeLogMessages();\n\t\tthis.logMessagesChanged.emit();\n\t}\n\n\t/**\n\t * Removes the log messages written by the LocalStorageAppender with the given key.\n\t *\n\t * @param localStorageKey key for the local storage\n\t */\n\tpublic removeLogMessagesFromLocalStorage(localStorageKey: string): void {\n\t\tLocalStorageAppender.removeLogMessages(localStorageKey);\n\t\tthis.logMessagesChanged.emit();\n\t}\n}\n","import { NgModule } from \"@angular/core\";\n\n@NgModule({\n\timports: [\n\t],\n\tdeclarations: [\n\t],\n\texports: [\n\t]\n})\nexport class LoggingServiceModule { }\n","/*\n * Public API Surface of ionic-logging-service.\n */\n\nexport * from \"./lib/ajax-appender.configuration\";\nexport * from \"./lib/ajax-appender.model\";\nexport * from \"./lib/browser-console-appender.configuration\";\nexport * from \"./lib/local-storage-appender.configuration\";\nexport * from \"./lib/local-storage-appender.model\";\nexport * from \"./lib/log-level.converter\";\nexport * from \"./lib/log-level.model\";\nexport * from \"./lib/log-message.model\";\nexport * from \"./lib/logger.model\";\nexport * from \"./lib/logging.service\";\nexport * from \"./lib/logging-service.configuration\";\nexport * from \"./lib/logging-service.module\";\nexport * from \"./lib/memory-appender.configuration\";\nexport * from \"./lib/memory-appender.model\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAGA;;;;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AA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFd,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEN,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACX,oBAAA,UAAU,EAAE,MAAM;AAClB,iBAAA,CAAA;;;MCbY,oBAAoB,CAAA;8GAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAApB,oBAAoB,EAAA,CAAA,CAAA,EAAA;+GAApB,oBAAoB,EAAA,CAAA,CAAA,EAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBARhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,EACR;AACD,oBAAA,YAAY,EAAE,EACb;AACD,oBAAA,OAAO,EAAE,EACR;AACD,iBAAA,CAAA;;;ACTD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ionic-logging-service",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"description": "Logging functionalities for apps built with Ionic framework",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Markus Wagner",
|
|
@@ -16,18 +16,14 @@
|
|
|
16
16
|
"log4javascript"
|
|
17
17
|
],
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@angular/common": "^
|
|
20
|
-
"@angular/core": "^
|
|
19
|
+
"@angular/common": "^16.0.0",
|
|
20
|
+
"@angular/core": "^16.0.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"log4javascript": "^1.4.16",
|
|
24
24
|
"tslib": "^2.3.1"
|
|
25
25
|
},
|
|
26
|
-
"module": "
|
|
27
|
-
"es2020": "fesm2020/ionic-logging-service.mjs",
|
|
28
|
-
"esm2020": "esm2020/ionic-logging-service.mjs",
|
|
29
|
-
"fesm2020": "fesm2020/ionic-logging-service.mjs",
|
|
30
|
-
"fesm2015": "fesm2015/ionic-logging-service.mjs",
|
|
26
|
+
"module": "fesm2022/ionic-logging-service.mjs",
|
|
31
27
|
"typings": "index.d.ts",
|
|
32
28
|
"exports": {
|
|
33
29
|
"./package.json": {
|
|
@@ -35,11 +31,9 @@
|
|
|
35
31
|
},
|
|
36
32
|
".": {
|
|
37
33
|
"types": "./index.d.ts",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"node": "./fesm2015/ionic-logging-service.mjs",
|
|
42
|
-
"default": "./fesm2020/ionic-logging-service.mjs"
|
|
34
|
+
"esm2022": "./esm2022/ionic-logging-service.mjs",
|
|
35
|
+
"esm": "./esm2022/ionic-logging-service.mjs",
|
|
36
|
+
"default": "./fesm2022/ionic-logging-service.mjs"
|
|
43
37
|
}
|
|
44
38
|
},
|
|
45
39
|
"sideEffects": false
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from "@angular/core";
|
|
2
|
-
import * as log4javascript from "log4javascript";
|
|
3
|
-
import { JsonLayout } from "./json-layout.model";
|
|
4
|
-
import { LogLevelConverter } from "./log-level.converter";
|
|
5
|
-
/**
|
|
6
|
-
* An appender which sends the log messages to a server via HTTP.
|
|
7
|
-
*
|
|
8
|
-
* A typical configuration could be:
|
|
9
|
-
*
|
|
10
|
-
* ```json
|
|
11
|
-
* {
|
|
12
|
-
* "url": "https://my.backend.xy/LoggingBackend",
|
|
13
|
-
* "batchSize": 10,
|
|
14
|
-
* "timerInterval": 60000,
|
|
15
|
-
* "threshold": "INFO"
|
|
16
|
-
* }
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
export class AjaxAppender extends log4javascript.Appender {
|
|
20
|
-
/**
|
|
21
|
-
* Creates a new instance of the appender.
|
|
22
|
-
*
|
|
23
|
-
* @param configuration configuration for the appender.
|
|
24
|
-
*/
|
|
25
|
-
constructor(configuration) {
|
|
26
|
-
super();
|
|
27
|
-
if (!configuration) {
|
|
28
|
-
throw new Error("configuration must be not empty");
|
|
29
|
-
}
|
|
30
|
-
if (!configuration.url) {
|
|
31
|
-
throw new Error("url must be not empty");
|
|
32
|
-
}
|
|
33
|
-
this.ajaxAppender = new log4javascript.AjaxAppender(configuration.url, configuration.withCredentials);
|
|
34
|
-
this.url = configuration.url;
|
|
35
|
-
this.withCredentials = configuration.withCredentials;
|
|
36
|
-
this.ajaxAppender.setLayout(new JsonLayout(false, false));
|
|
37
|
-
this.ajaxAppender.addHeader("Content-Type", "application/json; charset=utf-8");
|
|
38
|
-
this.ajaxAppender.setSendAllOnUnload(true);
|
|
39
|
-
this.appenderFailed = new EventEmitter();
|
|
40
|
-
this.ajaxAppender.setFailCallback((message) => {
|
|
41
|
-
this.appenderFailed.emit(message);
|
|
42
|
-
});
|
|
43
|
-
// process remaining configuration
|
|
44
|
-
this.configure({
|
|
45
|
-
batchSize: configuration.batchSize || AjaxAppender.batchSizeDefault,
|
|
46
|
-
threshold: configuration.threshold || AjaxAppender.thresholdDefault,
|
|
47
|
-
timerInterval: configuration.timerInterval || AjaxAppender.timerIntervalDefault,
|
|
48
|
-
url: configuration.url,
|
|
49
|
-
withCredentials: configuration.withCredentials
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Configures the logging depending on the given configuration.
|
|
54
|
-
*
|
|
55
|
-
* Only the defined properties get overwritten.
|
|
56
|
-
* Neither url nor withCredentials can be modified.
|
|
57
|
-
*
|
|
58
|
-
* @param configuration configuration data.
|
|
59
|
-
*/
|
|
60
|
-
configure(configuration) {
|
|
61
|
-
if (configuration) {
|
|
62
|
-
if (configuration.url && configuration.url !== this.url) {
|
|
63
|
-
throw new Error("url must not be changed");
|
|
64
|
-
}
|
|
65
|
-
if (configuration.withCredentials && configuration.withCredentials !== this.withCredentials) {
|
|
66
|
-
throw new Error("withCredentials must not be changed");
|
|
67
|
-
}
|
|
68
|
-
if (configuration.batchSize) {
|
|
69
|
-
this.setBatchSize(configuration.batchSize);
|
|
70
|
-
}
|
|
71
|
-
if (typeof configuration.timerInterval === "number") {
|
|
72
|
-
this.setTimerInterval(configuration.timerInterval);
|
|
73
|
-
}
|
|
74
|
-
if (configuration.threshold) {
|
|
75
|
-
const convertedThreshold = LogLevelConverter.levelToLog4Javascript(LogLevelConverter.levelFromString(configuration.threshold));
|
|
76
|
-
this.setThreshold(convertedThreshold);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Appender-specific method to append a log message.
|
|
82
|
-
*
|
|
83
|
-
* @param loggingEvent event to be appended.
|
|
84
|
-
*/
|
|
85
|
-
append(loggingEvent) {
|
|
86
|
-
this.ajaxAppender.append(loggingEvent);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Gets the appender's name.
|
|
90
|
-
* Mainly for unit testing purposes.
|
|
91
|
-
*
|
|
92
|
-
* @return appender's name
|
|
93
|
-
*/
|
|
94
|
-
toString() {
|
|
95
|
-
return "Ionic.Logging.AjaxAppender";
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Get the internally used appender.
|
|
99
|
-
* Mainly for unit testing purposes.
|
|
100
|
-
*/
|
|
101
|
-
getInternalAppender() {
|
|
102
|
-
return this.ajaxAppender;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Returns the number of log messages sent in each request.
|
|
106
|
-
*/
|
|
107
|
-
getBatchSize() {
|
|
108
|
-
return this.ajaxAppender.getBatchSize();
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Sets the number of log messages to send in each request.
|
|
112
|
-
*
|
|
113
|
-
* @param batchSize new batch size
|
|
114
|
-
*/
|
|
115
|
-
setBatchSize(batchSize) {
|
|
116
|
-
this.ajaxAppender.setBatchSize(batchSize);
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Returns the appender's layout.
|
|
120
|
-
*/
|
|
121
|
-
getLayout() {
|
|
122
|
-
return this.ajaxAppender.getLayout();
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Sets the appender's layout.
|
|
126
|
-
*/
|
|
127
|
-
setLayout(layout) {
|
|
128
|
-
this.ajaxAppender.setLayout(layout);
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Returns the length of time in milliseconds between each sending of queued log messages.
|
|
132
|
-
*/
|
|
133
|
-
getTimerInterval() {
|
|
134
|
-
return this.ajaxAppender.getTimerInterval();
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Sets the length of time in milliseconds between each sending of queued log messages.
|
|
138
|
-
*
|
|
139
|
-
* @param timerInterval new timer interval
|
|
140
|
-
*/
|
|
141
|
-
setTimerInterval(timerInterval) {
|
|
142
|
-
this.ajaxAppender.setTimed(timerInterval > 0);
|
|
143
|
-
this.ajaxAppender.setTimerInterval(timerInterval);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
AjaxAppender.batchSizeDefault = 1;
|
|
147
|
-
AjaxAppender.timerIntervalDefault = 0;
|
|
148
|
-
AjaxAppender.thresholdDefault = "WARN";
|
|
149
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWpheC1hcHBlbmRlci5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2lvbmljLWxvZ2dpbmctc2VydmljZS9zcmMvbGliL2FqYXgtYXBwZW5kZXIubW9kZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUU3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