UNPKG

@seagull/logging

Version:

Logging utilities for the Seagull Framework

16 lines (12 loc) 312 B
import * as log from 'npmlog' import { Writable } from 'stream' export class Stash extends Writable { buffer: log.MessageObject[] = [] constructor() { super({ objectMode: true }) } _write(msg: log.MessageObject, encoding: any, callback: any): void { this.buffer.push(msg) callback() } }