@akc42/app-utils 3.6.0 → 3.6.2
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/debug.js +1 -6
- package/package.json +1 -1
package/debug.js
CHANGED
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
debugDump - perform a dump to the server (and and a clearing out of the buffered info) of the debug calls made to date
|
|
64
64
|
|
|
65
65
|
*/
|
|
66
|
-
import config from './config-promise.js';
|
|
67
66
|
|
|
68
67
|
const BUFFER_SIZE = 50;
|
|
69
68
|
const KEY_TOPIC = 'key'; //topic name which will get kept from a full resource buffer when we empty it.
|
|
@@ -128,7 +127,7 @@ function Debug(t) {
|
|
|
128
127
|
topic: tl,
|
|
129
128
|
timestamp: new Date().getTime(),
|
|
130
129
|
defined: false, //has the config been defined yet
|
|
131
|
-
debug:
|
|
130
|
+
debug: function (...args) {
|
|
132
131
|
//do time calc before potential delay to see if we are enabled
|
|
133
132
|
const now = new Date().getTime();
|
|
134
133
|
const gap = now - this.timestamp;
|
|
@@ -137,10 +136,6 @@ function Debug(t) {
|
|
|
137
136
|
return `${cum} ${arg}`.trim();
|
|
138
137
|
}, '');
|
|
139
138
|
if (initialised) performance.mark(this.topic, { detail: message }); //save our message locally regardless of if enabled
|
|
140
|
-
if (!this.defined) {
|
|
141
|
-
await config();
|
|
142
|
-
this.defined = true;
|
|
143
|
-
}
|
|
144
139
|
let enabled = false;
|
|
145
140
|
const debugConf = sessionStorage.getItem('debug');
|
|
146
141
|
if (debugConf) {
|