FeatureMessageLogWriter

abstract class FeatureMessageLogWriter @JvmOverloads constructor(targetLogger: KLogger, logLevel: FeatureMessageLogWriter.LogLevel = LogLevel.INFO) : FeatureMessageProcessor(source)

An abstract base class for implementing a stream feature provider that logs incoming feature messages into a provided logger instance.

Parameters

targetLogger

The KLogger instance used for feature messages to be streamed into.

Constructors

Link copied to clipboard
constructor(targetLogger: KLogger, logLevel: FeatureMessageLogWriter.LogLevel = LogLevel.INFO)

Types

Link copied to clipboard

Defines the logging levels supported by the system.

Properties

Link copied to clipboard
open override val isOpen: StateFlow<Boolean>

A StateFlow representing the current open state of the processor.

Link copied to clipboard

A filter for messages to be sent to message processors.

Functions

Link copied to clipboard
open suspend override fun close()

Releases resources held by this processor.

Link copied to clipboard
expect open suspend fun initialize()

Initializes the feature output stream provider to ensure it is ready for use.

Link copied to clipboard
expect suspend fun onMessage(message: FeatureMessage)

Receives and processes an incoming feature message.

Link copied to clipboard
expect fun setMessageFilter(filter: (FeatureMessage) -> Boolean)

Sets the message filter used to determine which feature messages should be processed.

Link copied to clipboard

Converts the incoming ai.koog.agents.core.feature.message.FeatureMessage into a target logger message.