ionic-logging-service 18.0.0 → 21.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.
Files changed (39) hide show
  1. package/README.md +11 -21
  2. package/fesm2022/ionic-logging-service.mjs +42 -72
  3. package/fesm2022/ionic-logging-service.mjs.map +1 -1
  4. package/package.json +9 -8
  5. package/types/ionic-logging-service.d.ts +643 -0
  6. package/esm2022/ionic-logging-service.mjs +0 -5
  7. package/esm2022/lib/ajax-appender.configuration.mjs +0 -2
  8. package/esm2022/lib/ajax-appender.model.mjs +0 -149
  9. package/esm2022/lib/browser-console-appender.configuration.mjs +0 -2
  10. package/esm2022/lib/json-layout.model.mjs +0 -31
  11. package/esm2022/lib/local-storage-appender.configuration.mjs +0 -2
  12. package/esm2022/lib/local-storage-appender.model.mjs +0 -177
  13. package/esm2022/lib/log-level.converter.mjs +0 -92
  14. package/esm2022/lib/log-level.model.mjs +0 -47
  15. package/esm2022/lib/log-message.model.mjs +0 -2
  16. package/esm2022/lib/logger.model.mjs +0 -191
  17. package/esm2022/lib/logging-service.configuration.mjs +0 -2
  18. package/esm2022/lib/logging-service.module.mjs +0 -16
  19. package/esm2022/lib/logging.service.mjs +0 -167
  20. package/esm2022/lib/memory-appender.configuration.mjs +0 -2
  21. package/esm2022/lib/memory-appender.model.mjs +0 -133
  22. package/esm2022/public_api.mjs +0 -18
  23. package/index.d.ts +0 -5
  24. package/lib/ajax-appender.configuration.d.ts +0 -37
  25. package/lib/ajax-appender.model.d.ts +0 -92
  26. package/lib/browser-console-appender.configuration.d.ts +0 -13
  27. package/lib/json-layout.model.d.ts +0 -20
  28. package/lib/local-storage-appender.configuration.d.ts +0 -23
  29. package/lib/local-storage-appender.model.d.ts +0 -95
  30. package/lib/log-level.converter.d.ts +0 -28
  31. package/lib/log-level.model.d.ts +0 -37
  32. package/lib/log-message.model.d.ts +0 -25
  33. package/lib/logger.model.d.ts +0 -88
  34. package/lib/logging-service.configuration.d.ts +0 -40
  35. package/lib/logging-service.module.d.ts +0 -6
  36. package/lib/logging.service.d.ts +0 -84
  37. package/lib/memory-appender.configuration.d.ts +0 -19
  38. package/lib/memory-appender.model.d.ts +0 -81
  39. package/public_api.d.ts +0 -14
package/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # ionic-logging-service
2
2
 
3
- **The dependencies used by the latest version are the same as needed for [Ionic 7.0.0](https://github.com/ionic-team/ionic/blob/master/CHANGELOG.md). For older versions use:**
3
+ **The dependencies used by the latest version are the same as needed for [Ionic 8.0.0](https://github.com/ionic-team/ionic/blob/master/CHANGELOG.md). For older versions use:**
4
4
 
5
5
  | ionic-logging-service | Ionic | Angular
6
6
  | ------ | -------- | ------
7
+ | 21.0.0 | >= 8.0.0 | >=21.0.0
7
8
  | 18.0.0 | >= 7.0.0 | >=17.0.0
8
9
  | 17.0.0 | >= 6.1.9 | ^16.0.0
9
10
  | 16.0.0 | >= 6.1.9 | ^15.0.0
@@ -121,29 +122,18 @@ export const environment = {
121
122
  };
122
123
  ```
123
124
 
124
- Call `configure()` in your `app.module.ts`:
125
+ Call `configure()` in your `app.config.ts`:
125
126
 
126
127
  ```TypeScript
127
- export function configureLogging(loggingService: LoggingService): () => void {
128
- return () => loggingService.configure(environment.logging);
129
- }
130
-
131
- @NgModule({
132
- ...
133
- imports: [
134
- ...
135
- LoggingServiceModule
136
- ],
128
+ export const appConfig: ApplicationConfig = {
137
129
  providers: [
138
- {
139
- deps: [LoggingService],
140
- multi: true,
141
- provide: APP_INITIALIZER,
142
- useFactory: configureLogging
143
- }
130
+ ...
131
+ provideAppInitializer(() => {
132
+ const loggingService = inject(LoggingService);
133
+ loggingService.configure(environment.logging);
134
+ }),
144
135
  ]
145
- })
146
- export class AppModule { }
136
+ };
147
137
  ```
148
138
 
149
139
  ### logLevels
@@ -185,4 +175,4 @@ With `memoryAppender`, it is possible to configure the `MemoryAppender`, which k
185
175
 
186
176
  ## API
187
177
 
188
- see [API documentation](https://ritzlgrmft.github.io/ionic-logging-service//service/index.html).
178
+ see [API documentation](https://ritzlgrmft.github.io/ionic-logging-service/service/index.html).
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Injectable, NgModule } from '@angular/core';
2
+ import { signal, Injectable } from '@angular/core';
3
3
  import * as log4javascript from 'log4javascript';
4
4
 
5
5
  /**
@@ -40,42 +40,34 @@ var LogLevel;
40
40
  /**
41
41
  * All events should be logged.
42
42
  */
43
- // eslint-disable-next-line @typescript-eslint/naming-convention
44
43
  LogLevel[LogLevel["ALL"] = 0] = "ALL";
45
44
  /**
46
45
  * A fine-grained debug message, typically capturing the flow through the application.
47
46
  */
48
- // eslint-disable-next-line @typescript-eslint/naming-convention
49
47
  LogLevel[LogLevel["TRACE"] = 1] = "TRACE";
50
48
  /**
51
49
  * A general debugging event.
52
50
  */
53
- // eslint-disable-next-line @typescript-eslint/naming-convention
54
51
  LogLevel[LogLevel["DEBUG"] = 2] = "DEBUG";
55
52
  /**
56
53
  * An event for informational purposes.
57
54
  */
58
- // eslint-disable-next-line @typescript-eslint/naming-convention
59
55
  LogLevel[LogLevel["INFO"] = 3] = "INFO";
60
56
  /**
61
57
  * An event that might possible lead to an error.
62
58
  */
63
- // eslint-disable-next-line @typescript-eslint/naming-convention
64
59
  LogLevel[LogLevel["WARN"] = 4] = "WARN";
65
60
  /**
66
61
  * An error in the application, possibly recoverable.
67
62
  */
68
- // eslint-disable-next-line @typescript-eslint/naming-convention
69
63
  LogLevel[LogLevel["ERROR"] = 5] = "ERROR";
70
64
  /**
71
65
  * A severe error that will prevent the application from continuing.
72
66
  */
73
- // eslint-disable-next-line @typescript-eslint/naming-convention
74
67
  LogLevel[LogLevel["FATAL"] = 6] = "FATAL";
75
68
  /**
76
69
  * No events will be logged.
77
70
  */
78
- // eslint-disable-next-line @typescript-eslint/naming-convention
79
71
  LogLevel[LogLevel["OFF"] = 7] = "OFF";
80
72
  })(LogLevel || (LogLevel = {}));
81
73
 
@@ -194,6 +186,7 @@ class AjaxAppender extends log4javascript.Appender {
194
186
  */
195
187
  constructor(configuration) {
196
188
  super();
189
+ this.lastFailure = signal(undefined, ...(ngDevMode ? [{ debugName: "lastFailure" }] : []));
197
190
  if (!configuration) {
198
191
  throw new Error("configuration must be not empty");
199
192
  }
@@ -206,9 +199,8 @@ class AjaxAppender extends log4javascript.Appender {
206
199
  this.ajaxAppender.setLayout(new JsonLayout(false, false));
207
200
  this.ajaxAppender.addHeader("Content-Type", "application/json; charset=utf-8");
208
201
  this.ajaxAppender.setSendAllOnUnload(true);
209
- this.appenderFailed = new EventEmitter();
210
202
  this.ajaxAppender.setFailCallback((message) => {
211
- this.appenderFailed.emit(message);
203
+ this.lastFailure.set(message);
212
204
  });
213
205
  // process remaining configuration
214
206
  this.configure({
@@ -312,6 +304,13 @@ class AjaxAppender extends log4javascript.Appender {
312
304
  this.ajaxAppender.setTimed(timerInterval > 0);
313
305
  this.ajaxAppender.setTimerInterval(timerInterval);
314
306
  }
307
+ /**
308
+ * Last error message when the appender could not send log messages to the server.
309
+ * @returns error message
310
+ */
311
+ getLastFailure() {
312
+ return this.lastFailure.asReadonly();
313
+ }
315
314
  }
316
315
 
317
316
  /**
@@ -532,7 +531,7 @@ class Logger {
532
531
  for (const param of params) {
533
532
  args.push(this.formatArgument(param));
534
533
  }
535
- this.logger.trace.apply(this.logger, args);
534
+ this.logger.trace(...args);
536
535
  }
537
536
  }
538
537
  /**
@@ -547,7 +546,7 @@ class Logger {
547
546
  for (const param of params) {
548
547
  args.push(this.formatArgument(param));
549
548
  }
550
- this.logger.debug.apply(this.logger, args);
549
+ this.logger.debug(...args);
551
550
  }
552
551
  }
553
552
  /**
@@ -562,7 +561,7 @@ class Logger {
562
561
  for (const param of params) {
563
562
  args.push(this.formatArgument(param));
564
563
  }
565
- this.logger.info.apply(this.logger, args);
564
+ this.logger.info(...args);
566
565
  }
567
566
  }
568
567
  /**
@@ -577,7 +576,7 @@ class Logger {
577
576
  for (const param of params) {
578
577
  args.push(this.formatArgument(param));
579
578
  }
580
- this.logger.warn.apply(this.logger, args);
579
+ this.logger.warn(...args);
581
580
  }
582
581
  }
583
582
  /**
@@ -592,7 +591,7 @@ class Logger {
592
591
  for (const param of params) {
593
592
  args.push(this.formatArgument(param));
594
593
  }
595
- this.logger.error.apply(this.logger, args);
594
+ this.logger.error(...args);
596
595
  }
597
596
  }
598
597
  /**
@@ -607,7 +606,7 @@ class Logger {
607
606
  for (const param of params) {
608
607
  args.push(this.formatArgument(param));
609
608
  }
610
- this.logger.fatal.apply(this.logger, args);
609
+ this.logger.fatal(...args);
611
610
  }
612
611
  }
613
612
  /**
@@ -625,7 +624,7 @@ class Logger {
625
624
  args.push(this.formatArgument(param));
626
625
  }
627
626
  }
628
- this.logger.info.apply(this.logger, args);
627
+ this.logger.info(...args);
629
628
  }
630
629
  }
631
630
  /**
@@ -643,7 +642,7 @@ class Logger {
643
642
  args.push(this.formatArgument(param));
644
643
  }
645
644
  }
646
- this.logger.info.apply(this.logger, args);
645
+ this.logger.info(...args);
647
646
  }
648
647
  }
649
648
  /**
@@ -703,7 +702,7 @@ class MemoryAppender extends log4javascript.Appender {
703
702
  */
704
703
  constructor(configuration) {
705
704
  super();
706
- this.logMessages = [];
705
+ this.logMessages = signal([], ...(ngDevMode ? [{ debugName: "logMessages" }] : []));
707
706
  // process configuration
708
707
  configuration = configuration || {};
709
708
  this.configure({
@@ -736,8 +735,8 @@ class MemoryAppender extends log4javascript.Appender {
736
735
  */
737
736
  append(loggingEvent) {
738
737
  // if logMessages is already full, remove oldest element
739
- while (this.logMessages.length >= this.maxMessages) {
740
- this.logMessages.shift();
738
+ while (this.logMessages().length >= this.maxMessages) {
739
+ this.logMessages.update(messages => messages.slice(1));
741
740
  }
742
741
  // add event to logMessages
743
742
  const message = {
@@ -747,11 +746,7 @@ class MemoryAppender extends log4javascript.Appender {
747
746
  methodName: loggingEvent.messages[0],
748
747
  timeStamp: loggingEvent.timeStamp,
749
748
  };
750
- this.logMessages.push(message);
751
- // inform about new message
752
- if (typeof this.onLogMessagesChangedCallback === "function") {
753
- this.onLogMessagesChangedCallback(message);
754
- }
749
+ this.logMessages.update(messages => [...messages, message]);
755
750
  }
756
751
  /**
757
752
  * Gets the appender's name.
@@ -778,8 +773,8 @@ class MemoryAppender extends log4javascript.Appender {
778
773
  setMaxMessages(value) {
779
774
  this.maxMessages = value;
780
775
  // if there are too much logMessages for the new value, remove oldest messages
781
- if (this.logMessages.length > this.maxMessages) {
782
- this.logMessages.splice(0, this.logMessages.length - this.maxMessages);
776
+ if (this.logMessages().length > this.maxMessages) {
777
+ this.logMessages.update(messages => messages.slice(this.logMessages().length - this.maxMessages));
783
778
  }
784
779
  }
785
780
  /**
@@ -788,22 +783,13 @@ class MemoryAppender extends log4javascript.Appender {
788
783
  * @return stored messages
789
784
  */
790
785
  getLogMessages() {
791
- return this.logMessages;
786
+ return this.logMessages.asReadonly();
792
787
  }
793
788
  /**
794
789
  * Remove all messages stored in memory.
795
790
  */
796
791
  removeLogMessages() {
797
- this.logMessages.splice(0);
798
- }
799
- /**
800
- * Registers a callback which will be called every time a new message is appended.
801
- * This could be useful if you want to show new messages in realtime.
802
- *
803
- * @param callback callback to be called
804
- */
805
- setOnLogMessagesChangedCallback(callback) {
806
- this.onLogMessagesChangedCallback = callback;
792
+ this.logMessages.set([]);
807
793
  }
808
794
  }
809
795
 
@@ -823,9 +809,6 @@ class LoggingService {
823
809
  constructor() {
824
810
  // prevent log4javascript to show alerts on case of errors
825
811
  log4javascript.logLog.setQuietMode(true);
826
- // create event emitter
827
- this.logMessagesChanged = new EventEmitter();
828
- this.ajaxAppenderFailed = new EventEmitter();
829
812
  // configure appender
830
813
  const logger = log4javascript.getRootLogger();
831
814
  logger.setLevel(log4javascript.Level.WARN);
@@ -837,9 +820,6 @@ class LoggingService {
837
820
  // in-memory appender for display on log messages page
838
821
  this.memoryAppender = new MemoryAppender();
839
822
  this.memoryAppender.setLayout(new log4javascript.PatternLayout("%d{HH:mm:ss,SSS} %c %m"));
840
- this.memoryAppender.setOnLogMessagesChangedCallback((message) => {
841
- this.logMessagesChanged.emit();
842
- });
843
823
  logger.addAppender(this.memoryAppender);
844
824
  this.configure();
845
825
  }
@@ -865,18 +845,15 @@ class LoggingService {
865
845
  try {
866
846
  logger.setLevel(LogLevelConverter.levelToLog4Javascript(LogLevelConverter.levelFromString(level.logLevel)));
867
847
  }
868
- catch (e) {
848
+ catch {
869
849
  throw new Error(`invalid log level ${level.logLevel}`);
870
850
  }
871
851
  }
872
852
  }
873
853
  // configure AjaxAppender
874
854
  if (typeof configuration.ajaxAppender !== "undefined") {
875
- const ajaxAppender = new AjaxAppender(configuration.ajaxAppender);
876
- ajaxAppender.appenderFailed.subscribe((message) => {
877
- this.ajaxAppenderFailed.emit(message);
878
- });
879
- log4javascript.getRootLogger().addAppender(ajaxAppender);
855
+ this.ajaxAppender = new AjaxAppender(configuration.ajaxAppender);
856
+ log4javascript.getRootLogger().addAppender(this.ajaxAppender);
880
857
  }
881
858
  // configure LocalStorageAppender
882
859
  if (typeof configuration.localStorageAppender !== "undefined") {
@@ -945,7 +922,6 @@ class LoggingService {
945
922
  */
946
923
  removeLogMessages() {
947
924
  this.memoryAppender.removeLogMessages();
948
- this.logMessagesChanged.emit();
949
925
  }
950
926
  /**
951
927
  * Removes the log messages written by the LocalStorageAppender with the given key.
@@ -954,32 +930,26 @@ class LoggingService {
954
930
  */
955
931
  removeLogMessagesFromLocalStorage(localStorageKey) {
956
932
  LocalStorageAppender.removeLogMessages(localStorageKey);
957
- this.logMessagesChanged.emit();
958
933
  }
959
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
960
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingService, providedIn: "root" }); }
934
+ /**
935
+ * Error messages when the ajax appender could not send log messages to the server.
936
+ * @returns error messages
937
+ */
938
+ getLastAjaxAppenderFailure() {
939
+ return this.ajaxAppender
940
+ ? this.ajaxAppender.getLastFailure()
941
+ : signal(undefined).asReadonly();
942
+ }
943
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
944
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingService, providedIn: "root" }); }
961
945
  }
962
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingService, decorators: [{
946
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: LoggingService, decorators: [{
963
947
  type: Injectable,
964
948
  args: [{
965
949
  providedIn: "root"
966
950
  }]
967
951
  }], ctorParameters: () => [] });
968
952
 
969
- class LoggingServiceModule {
970
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingServiceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
971
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.2", ngImport: i0, type: LoggingServiceModule }); }
972
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingServiceModule }); }
973
- }
974
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LoggingServiceModule, decorators: [{
975
- type: NgModule,
976
- args: [{
977
- imports: [],
978
- declarations: [],
979
- exports: []
980
- }]
981
- }] });
982
-
983
953
  /*
984
954
  * Public API Surface of ionic-logging-service.
985
955
  */
@@ -988,5 +958,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImpor
988
958
  * Generated bundle index. Do not edit.
989
959
  */
990
960
 
991
- export { AjaxAppender, LocalStorageAppender, LogLevel, LogLevelConverter, Logger, LoggingService, LoggingServiceModule, MemoryAppender };
961
+ export { AjaxAppender, LocalStorageAppender, LogLevel, LogLevelConverter, Logger, LoggingService, MemoryAppender };
992
962
  //# sourceMappingURL=ionic-logging-service.mjs.map
@@ -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_api';\n"],"names":[],"mappings":";;;;AAGA;;;;AAIG;AACU,MAAA,UAAW,SAAQ,cAAc,CAAC,UAAU,CAAA;AAExD;;AAEG;AACI,IAAA,MAAM,CAAC,YAA0B,EAAA;AACvC,QAAA,MAAM,QAAQ,GAAG;AAChB,YAAA,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI;YAChC,SAAS,EAAE,YAAY,CAAC,uBAAuB;AAC/C,YAAA,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE;AACpC,YAAA,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;AACzB,YAAA,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,YAAY,CAAC,mBAAmB,EAAE,GAAG,YAAY,CAAC,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AAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;KAC/B;AAED;;;;AAIG;AACI,IAAA,iCAAiC,CAAC,eAAuB,EAAA;AAC/D,QAAA,oBAAoB,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;AACxD,QAAA,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;KAC/B;8GAnLW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAd,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,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;;;;"}
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/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\tALL,\n\n\t/**\n\t * A fine-grained debug message, typically capturing the flow through the application.\n\t */\n\tTRACE,\n\n\t/**\n\t * A general debugging event.\n\t */\n\tDEBUG,\n\n\t/**\n\t * An event for informational purposes.\n\t */\n\tINFO,\n\n\t/**\n\t * An event that might possible lead to an error.\n\t */\n\tWARN,\n\n\t/**\n\t * An error in the application, possibly recoverable.\n\t */\n\tERROR,\n\n\t/**\n\t * A severe error that will prevent the application from continuing.\n\t */\n\tFATAL,\n\n\t/**\n\t * No events will be logged.\n\t */\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 { Signal, signal } 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\tprivate ajaxAppender: log4javascript.AjaxAppender;\n\tprivate url: string;\n\tprivate withCredentials: boolean;\n\n\tprivate lastFailure = signal<string>(undefined);\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.ajaxAppender.setFailCallback((message: any) => {\n\t\t\tthis.lastFailure.set(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\t/**\n\t * Last error message when the appender could not send log messages to the server.\n\t * @returns error message\n\t */\n\tpublic getLastFailure(): Signal<string> {\n\t\treturn this.lastFailure.asReadonly();\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(...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(...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(...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(...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(...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(...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(...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(...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\";\nimport { Signal, signal } from \"@angular/core\";\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 = signal<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?: MemoryAppenderConfiguration) {\n\t\tsuper();\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.update(messages => messages.slice(1));\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.update(messages => [...messages, message]);\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.update(messages => messages.slice(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(): Signal<LogMessage[]> {\n\t\treturn this.logMessages.asReadonly();\n\t}\n\n\t/**\n\t * Remove all messages stored in memory.\n\t */\n\tpublic removeLogMessages(): void {\n\t\tthis.logMessages.set([]);\n\t}\n}\n","import { Injectable, signal, Signal } 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\tprivate memoryAppender: MemoryAppender;\n\tprivate browserConsoleAppender: log4javascript.BrowserConsoleAppender;\n\tprivate ajaxAppender: AjaxAppender;\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// 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\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 {\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\tthis.ajaxAppender = new AjaxAppender(configuration.ajaxAppender);\n\t\t\tlog4javascript.getRootLogger().addAppender(this.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(): Signal<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}\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}\n\n\t/**\n\t * Error messages when the ajax appender could not send log messages to the server.\n\t * @returns error messages\n\t */\n\tpublic getLastAjaxAppenderFailure(): Signal<string> {\n\t\treturn this.ajaxAppender\n\t\t\t? this.ajaxAppender.getLastFailure()\n\t\t\t: signal<string>(undefined).asReadonly();\n\t}\n}\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\";\n\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;;;;AAIG;AACG,MAAO,UAAW,SAAQ,cAAc,CAAC,UAAU,CAAA;AAExD;;AAEG;AACI,IAAA,MAAM,CAAC,YAA0B,EAAA;AACvC,QAAA,MAAM,QAAQ,GAAG;AAChB,YAAA,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI;YAChC,SAAS,EAAE,YAAY,CAAC,uBAAuB;AAC/C,YAAA,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE;AACpC,YAAA,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;AACzB,YAAA,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,YAAY,CAAC,mBAAmB,EAAE,GAAG,YAAY,CAAC;SACvF;AACD,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;IAChC;AAEA;;;;;AAKG;IACI,QAAQ,GAAA;AACd,QAAA,OAAO,0BAA0B;IAClC;AACA;;ACjCD;;AAEG;IACS;AAAZ,CAAA,UAAY,QAAQ,EAAA;AACnB;;AAEG;AACH,IAAA,QAAA,C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