import { LogRecord , DisposableAppender } from '@osd/logging' ; internal export class BufferAppender implements DisposableAppender { /**
     * List of the buffered `LogRecord` instances.
     */ private readonly buffer : LogRecord [ ] = [ ] ; param record public append ( record ) { this . buffer . push ( record ) ; } /**
     * Clears buffer and returns all records that it had.
     */ public flush ( ) { return this . buffer . splice ( 0 , this . buffer . length ) ; } /**
     * Disposes `BufferAppender` and clears internal `LogRecord` buffer.
     */ public async dispose ( ) { this . flush ( ) ; } }