mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
@@ -2,8 +2,9 @@ window.logRingBuffer = [];
|
||||
window.logBufferDirty = false;
|
||||
|
||||
const logBuffer = (ts, type, msg) => {
|
||||
const maxLogLength = 8;
|
||||
window.logRingBuffer.push({ ts, type, msg });
|
||||
if (window.logRingBuffer.length > 10) window.logRingBuffer.shift();
|
||||
if (window.logRingBuffer.length > maxLogLength) window.logRingBuffer.shift();
|
||||
window.logBufferDirty = true;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user