logger

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogClient added in v1.1.0

type LogClient interface {
	Logs(docker.LogsOptions) error
}

LogClient wraps DockerClient with the minimal interface

type LogStreamer

type LogStreamer struct {
	DockerClient  LogClient
	ContainerID   string
	ContainerName string

	LogWriter io.WriteCloser
	ErrWriter io.WriteCloser
	// contains filtered or unexported fields
}

LogStreamer connects and activates container's log stream with io.Writer

func (*LogStreamer) Close added in v1.1.0

func (l *LogStreamer) Close()

Close kills streamer

func (*LogStreamer) Go

func (l *LogStreamer) Go(ctx context.Context) *LogStreamer

Go activates streamer

func (*LogStreamer) Wait added in v1.1.0

func (l *LogStreamer) Wait()

Wait for stream completion

type MultiWriter

type MultiWriter struct {
	// contains filtered or unexported fields
}

MultiWriter implements WriteCloser for multiple destinations. It is simplified version of stdlib MultiWriter. Ignores write error and don't stop the loop unless all writes failed.

func NewMultiWriterIgnoreErrors

func NewMultiWriterIgnoreErrors(writers ...io.WriteCloser) *MultiWriter

NewMultiWriterIgnoreErrors create WriteCloser for multiple destinations

func (*MultiWriter) Close

func (w *MultiWriter) Close() error

Close all writers, collect errors

func (*MultiWriter) WithExtJSON

func (w *MultiWriter) WithExtJSON(containerName string, group string) *MultiWriter

WithExtJSON turn JSON output mode on

func (*MultiWriter) Write

func (w *MultiWriter) Write(p []byte) (n int, err error)

Write to all writers and ignore errors unless they all have errors

Jump to

Keyboard shortcuts

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