file

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileOutput

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

FileOutput is an operator that writes logs to a file.

func (*FileOutput) Process

func (fo *FileOutput) Process(_ context.Context, entry *entry.Entry) error

Process will write an entry to the output file.

func (*FileOutput) Start

func (fo *FileOutput) Start() error

Start will open the output file.

func (*FileOutput) Stop

func (fo *FileOutput) Stop() error

Stop will close the output file.

type FileOutputConfig

type FileOutputConfig struct {
	helper.OutputConfig `yaml:",inline"`

	Path   string `json:"path" yaml:"path"`
	Format string `json:"format,omitempty" path:"format,omitempty"`
}

FileOutputConfig is the configuration of a file output operatorn.

func NewFileOutputConfig

func NewFileOutputConfig(operatorID string) *FileOutputConfig

NewFileOutputConfig creates a new file output config with default values

func (FileOutputConfig) Build

Build will build a file output operator.

Jump to

Keyboard shortcuts

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