flushBuffer function
Last updated: 2026-03-01T23:25:47.125Z
Location
Metrics
LOC: 15
Complexity: 4
Params: 0
Signature
flushBuffer(): : void
Source Code
function flushBuffer(): void {
for (const entry of buffer) {
const lvl: LogLevel = entry.level === "group" ? "debug" : entry.level;
if (shouldLog(lvl)) {
const logEntry: LogEntry = {
ts: new Date().toISOString(),
level: lvl,
ns: entry.prefix,
msg: formatArgs(entry.args),
};
addLogEntry(logEntry);
}
}
buffer.length = 0;
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| shouldLog | calls |
| formatArgs | calls |
| addLogEntry | calls |
Impact (Incoming)
| Source | Type |
|---|---|
| initLogger | calls |