message-tail.js
322 Bytes
"use strict";
const config = require("./config");
const CircularBuffer = require("circular-buffer");
const messages = new CircularBuffer(config.messages_log_count || 200);
function add(obj) {
messages.enq(obj);
}
function toArray() {
return messages.toarray();
}
exports.add = add;
exports.toArray = toArray;