logging

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MagicArgv1 is the magic argv1 for the containerd runtime v2 logging plugin mode.
	MagicArgv1 = "_NERDCTL_INTERNAL_LOGGING"
	MaxSize    = "max-size"
	MaxFile    = "max-file"
	Tag        = "tag"
)

Variables

This section is empty.

Functions

func Drivers added in v0.21.0

func Drivers() []string

func FetchLogs added in v0.21.0

func FetchLogs(journalctlArgs []string) error

func LogConfigFilePath added in v0.20.0

func LogConfigFilePath(dataStore, ns, id string) string

LogConfigFilePath returns the path of log-config.json

func Main

func Main(argv2 string) error

Main is the entrypoint for the containerd runtime v2 logging plugin mode.

Should be called only if argv1 == MagicArgv1.

func RegisterDriver added in v0.21.0

func RegisterDriver(name string, f DriverFactory)

func ValidateFluentdLoggerOpts added in v0.21.0

func ValidateFluentdLoggerOpts(config map[string]string) error

Types

type Driver added in v0.21.0

type Driver interface {
	Init(dataStore, ns, id string) error
	Process(dataStore string, config *logging.Config) error
}

func GetDriver added in v0.21.0

func GetDriver(name string, opts map[string]string) (Driver, error)

type DriverFactory added in v0.21.0

type DriverFactory func(map[string]string) (Driver, error)

type FluentdLogger added in v0.21.0

type FluentdLogger struct {
	Opts map[string]string
}

func (*FluentdLogger) Init added in v0.21.0

func (f *FluentdLogger) Init(dataStore, ns, id string) error

func (*FluentdLogger) Process added in v0.21.0

func (f *FluentdLogger) Process(_ string, config *logging.Config) error

type JournaldLogger added in v0.21.0

type JournaldLogger struct {
	Opts map[string]string
}

func (*JournaldLogger) Init added in v0.21.0

func (journaldLogger *JournaldLogger) Init(dataStore, ns, id string) error

func (*JournaldLogger) Process added in v0.21.0

func (journaldLogger *JournaldLogger) Process(dataStore string, config *logging.Config) error

type JsonLogger added in v0.21.0

type JsonLogger struct {
	Opts map[string]string
}

func (*JsonLogger) Init added in v0.21.0

func (jsonLogger *JsonLogger) Init(dataStore, ns, id string) error

func (*JsonLogger) Process added in v0.21.0

func (jsonLogger *JsonLogger) Process(dataStore string, config *logging.Config) error

type LogConfig added in v0.20.0

type LogConfig struct {
	Driver string            `json:"driver"`
	Opts   map[string]string `json:"opts,omitempty"`
}

LogConfig is marshalled as "log-config.json"

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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