logger

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0, EPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogConfigOption

type LogConfigOption func(specificConfigOpts interface{}) error

LogConfigOption provides configuration options for the creation of new LogDriver instances.

type LogDriver

type LogDriver interface {
	Type() LogDriverType
	WriteLogMessage(msg *LogMessage) error
	Close() error
}

LogDriver represents any kind of log drivers, such as jsonfile, syslog.

type LogDriverInfo

type LogDriverInfo struct {
	ContainerID      string
	ContainerName    string
	ContainerImageID string
	ContainerRootDir string
	DaemonName       string
}

LogDriverInfo provides container information for log driver.

type LogDriverMode

type LogDriverMode string

LogDriverMode indicates available logging modes.

type LogDriverType

type LogDriverType string

LogDriverType represents the different driver types - it must be used as identification instead of a plain string

type LogHandler

type LogHandler interface {
	// StartCopyToLogDriver starts to copy the streams data that will be logged.
	StartCopyToLogDriver()
	// Wait blocks until goroutines have finished.
	Wait()
}

LogHandler is responsible for handling the streams data to be logged.

func NewLogHandler

func NewLogHandler(destinationLogDriver LogDriver, sources map[string]io.Reader) LogHandler

NewLogHandler creates a new LogHandler

type LogMessage

type LogMessage struct {
	Source     string
	Line       []byte
	Timestamp  time.Time
	Attributes map[string]string
	Err        error
}

LogMessage represents the log message in the container json log.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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