interface LogRecordProcessor {
    forceFlush(): Promise<void>;
    onEmit(logRecord: LogRecord, context?: Context): void;
    shutdown(): Promise<void>;
}

Implemented by

Methods

  • Forces to export all finished log records

    Returns Promise<void>

  • Called when a LogRecord is emit

    Parameters

    • logRecord: LogRecord

      the ReadWriteLogRecord that just emitted.

    • Optionalcontext: Context

      the current Context, or an empty Context if the Logger was obtained with include_trace_context=false

    Returns void

  • Shuts down the processor. Called when SDK is shut down. This is an opportunity for processor to do any cleanup required.

    Returns Promise<void>