import { schema } from '@kbn/config-schema' ; import { Layout , LogRecord , DisposableAppender } from '@kbn/logging' ; import { Layouts , LayoutConfigType } from '../../layouts/layouts' ; const { literal , object } = schema ; export interface ConsoleAppenderConfig { type : 'console' ; layout : LayoutConfigType ; } internal export class ConsoleAppender implements DisposableAppender { public static configSchema = object ( { type : literal ( 'console' ) , layout : Layouts . configSchema , } ) ; param layout constructor ( private readonly layout ) { } param record public append ( record ) { console . log ( this . layout . format ( record ) ) ; } /**
     * Disposes `ConsoleAppender`.
     */ public dispose ( ) { } }