import { schema } from '@osd/config-schema' ; import { DisposableAppender , LogRecord } from '../../../logging' ; import { LegacyLoggingServer } from '../legacy_logging_server' ; import { LegacyVars } from '../../types' ; export interface LegacyAppenderConfig { kind : 'legacy-appender' ; legacyLoggingConfig ? : any ; } internal export class LegacyAppender implements DisposableAppender { public static configSchema = schema . object ( { kind : schema . literal ( 'legacy-appender' ) , legacyLoggingConfig : schema . any ( ) , } ) ; /**
     * Sets  Appender . receiveAllLevels because legacy does its own filtering based on the legacy logging
     * configuration.
      public readonly receiveAllLevels = true ; private readonly loggingServer : LegacyLoggingServer ; constructor ( legacyLoggingConfig ) { this . loggingServer = new LegacyLoggingServer ( legacyLoggingConfig ) ; } param record public append ( record ) { this . loggingServer . log ( record ) ; } public dispose ( ) { this . loggingServer . stop ( ) ; } }