nsyslog
Version:
Modular new generation log agent. Reads, transform, aggregate, correlate and send logs from sources to destinations
18 lines (14 loc) • 357 B
JavaScript
function timer(time) {
return new Promise(ok=>setTimeout(ok,time));
}
process.stdin.on('readable', () => {
let chunk;
// Use a loop to make sure we read all available data.
while ((chunk = process.stdin.read()) !== null) {
process.stdout.write(`data: ${chunk}`);
}
});
async function run() {
await timer(1000000);
}
run();