log

package
v0.46.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
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

type LogOutput struct {
	plugin.Base
	// contains filtered or unexported fields
}

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) Start

func (l *LogOutput) Start() error

Start the log output

func (*LogOutput) StartContext added in v0.46.0

func (l *LogOutput) StartContext(ctx context.Context) error

StartContext starts the plugin with ctx governing setup and run operations. Call Stop to wait for workers and release resources, including after cancellation.

func (*LogOutput) Stop

func (l *LogOutput) Stop() error

Stop the log output

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL