file

package
v0.102.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.53.0

type Config struct {
	helper.OutputConfig `mapstructure:",squash"`

	Path   string `mapstructure:"path"`
	Format string `mapstructure:"format"`
}

Config is the configuration of a file output operatorn.

func NewConfig added in v0.53.0

func NewConfig(operatorID string) *Config

NewConfig creates a new file output config with default values

func (Config) Build added in v0.53.0

Build will build a file output operator.

type Output added in v0.53.0

type Output struct {
	helper.OutputOperator
	// contains filtered or unexported fields
}

Output is an operator that writes logs to a file.

func (*Output) Process added in v0.53.0

func (o *Output) Process(_ context.Context, entry *entry.Entry) error

Process will write an entry to the output file.

func (*Output) Start added in v0.53.0

func (o *Output) Start(_ operator.Persister) error

Start will open the output file.

func (*Output) Stop added in v0.53.0

func (o *Output) Stop() error

Stop will close the output file.

Jump to

Keyboard shortcuts

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