@akc42/app-utils 3.3.0 → 3.3.1
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 +7 -5
- package/package.json +1 -1
package/debug.js
CHANGED
|
@@ -105,13 +105,15 @@ function unloadDebug() {
|
|
|
105
105
|
function debugDump() {
|
|
106
106
|
bufferFull(); //this clears out the marks and gives us a buffer to now send to
|
|
107
107
|
buffer.reverse();
|
|
108
|
+
let message = '';
|
|
108
109
|
for (let i = 0; i < buffer.length; i++) {
|
|
109
|
-
|
|
110
|
-
message: buffer[i].message,
|
|
111
|
-
gap: i < buffer.length - 1 ? buffer[i].time - buffer[i + 1].time : 0
|
|
112
|
-
})], { type: 'application/json' });
|
|
113
|
-
navigator.sendBeacon(`/api/debuglog/${buffer[i].topic}`, blob);
|
|
110
|
+
message += `(${buffer[i].topic}) ${buffer[i].message} :gap ${i < buffer.length - 1 ? buffer[i].time - buffer[i + 1].time : 0}ms\n`;
|
|
114
111
|
}
|
|
112
|
+
const blob = new Blob([JSON.stringify({
|
|
113
|
+
message: message
|
|
114
|
+
})], { type: 'application/json' });
|
|
115
|
+
navigator.sendBeacon(`/api/debuglog/clientpath`, blob);
|
|
116
|
+
|
|
115
117
|
buffer = []; //we will start our buffer from scratch again
|
|
116
118
|
|
|
117
119
|
}
|