"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.clearRecentLogEntries = exports.getRecentLogEntries = exports.pushRecentLogEntry = void 0;
let recentEntries = [];
function pushRecentLogEntry(entry, maxEntries) {
    recentEntries.push(entry);
    if (recentEntries.length > maxEntries) {
        recentEntries = recentEntries.slice(recentEntries.length - maxEntries);
    }
}
exports.pushRecentLogEntry = pushRecentLogEntry;
function getRecentLogEntries() {
    return [...recentEntries];
}
exports.getRecentLogEntries = getRecentLogEntries;
function clearRecentLogEntries() {
    recentEntries = [];
}
exports.clearRecentLogEntries = clearRecentLogEntries;
//# sourceMappingURL=log-buffer.js.map