Documentation
¶
Index ¶
Constants ¶
const ( FormatText = "text" FormatJSON = "json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogOptionFunc ¶
type LogOptionFunc func(*LogOutput)
func WithFilePath ¶ added in v0.40.0
func WithFilePath(path string) LogOptionFunc
WithFilePath specifies the file path to write logs to
func WithFormat ¶ added in v0.38.0
func WithFormat(format string) LogOptionFunc
WithFormat specifies the output format ("text" or "json")
func WithLevel ¶
func WithLevel(level slog.Level) LogOptionFunc
WithLevel sets the minimum event severity. Events are INFO-level, so levels above INFO consume events without writing them. The CLI also applies the resolved threshold to its diagnostic logger before constructing plugins.
func WithLogger ¶
func WithLogger(logger plugin.Logger) LogOptionFunc
WithLogger specifies the logger object to use for logging messages
type LogOutput ¶
func New ¶
func New(options ...LogOptionFunc) *LogOutput
func (*LogOutput) Role ¶ added in v0.46.0
func (l *LogOutput) Role() plugin.PluginType
Role identifies this plugin as a pipeline output.
func (*LogOutput) SetFileOpener ¶ added in v0.47.0
SetFileOpener supplies an instance-owned, confined file opener. The output owns the returned file and closes it on Stop. Configure before Start.
func (*LogOutput) SetProcessingObserver ¶ added in v0.47.0
func (l *LogOutput) SetProcessingObserver(observer func())
SetProcessingObserver observes completion of event processing, not durable persistence. Configure before Start; the callback must not block or call Stop.
func (*LogOutput) StartContext ¶ added in v0.46.0
StartContext starts the plugin with ctx governing setup and run operations. Call Stop to wait for workers and release resources, including after cancellation.