Package io.opentelemetry.sdk.logs
Interface LogProcessor
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
BatchLogProcessor,SimpleLogProcessor
LogProcessor is the interface to allow synchronous hooks for logs emitted by LogEmitters.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Closes thisLogProcessorafter processing any remaining logs, releasing any resources.static LogProcessorcomposite(LogProcessor... processors) Returns aLogProcessorwhich simply delegates to all processing to theprocessorsin order.static LogProcessorcomposite(Iterable<LogProcessor> processors) Returns aLogProcessorwhich simply delegates to all processing to theprocessorsin order.voidEmit a log.default io.opentelemetry.sdk.common.CompletableResultCodeProcess all logs that have not yet been processed.default io.opentelemetry.sdk.common.CompletableResultCodeshutdown()Shutdown the log processor.
-
Method Details
-
composite
Returns aLogProcessorwhich simply delegates to all processing to theprocessorsin order. -
composite
Returns aLogProcessorwhich simply delegates to all processing to theprocessorsin order. -
emit
Emit a log.- Parameters:
logData- the log
-
shutdown
default io.opentelemetry.sdk.common.CompletableResultCode shutdown()Shutdown the log processor.- Returns:
- result
-
forceFlush
default io.opentelemetry.sdk.common.CompletableResultCode forceFlush()Process all logs that have not yet been processed.- Returns:
- result
-
close
default void close()Closes thisLogProcessorafter processing any remaining logs, releasing any resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-