logger

package
Version: v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2017 License: Apache-2.0 Imports: 3 Imported by: 191

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	CreateContainerLogger(name string) Logger
	CreateBuildLogger(name string) Logger
	CreatePullLogger(name string) Logger
}

Factory defines methods a factory should implement, to create a Logger based on the specified container, image or service name.

type Logger

type Logger interface {
	Out(bytes []byte)
	Err(bytes []byte)
	OutWriter() io.Writer
	ErrWriter() io.Writer
}

Logger defines methods to implement for being a logger.

type NullLogger

type NullLogger struct {
}

NullLogger is a logger.Logger and logger.Factory implementation that does nothing.

func (*NullLogger) CreateBuildLogger added in v0.3.0

func (n *NullLogger) CreateBuildLogger(_ string) Logger

CreateBuildLogger allows NullLogger to implement logger.Factory.

func (*NullLogger) CreateContainerLogger added in v0.3.0

func (n *NullLogger) CreateContainerLogger(_ string) Logger

CreateContainerLogger allows NullLogger to implement logger.Factory.

func (*NullLogger) CreatePullLogger added in v0.3.0

func (n *NullLogger) CreatePullLogger(_ string) Logger

CreatePullLogger allows NullLogger to implement logger.Factory.

func (*NullLogger) Err

func (n *NullLogger) Err(_ []byte)

Err is a no-op function.

func (*NullLogger) ErrWriter added in v0.3.0

func (n *NullLogger) ErrWriter() io.Writer

ErrWriter returns the base writer

func (*NullLogger) Out

func (n *NullLogger) Out(_ []byte)

Out is a no-op function.

func (*NullLogger) OutWriter added in v0.3.0

func (n *NullLogger) OutWriter() io.Writer

OutWriter returns the base writer

type RawLogger added in v0.3.0

type RawLogger struct {
}

RawLogger is a logger.Logger and logger.Factory implementation that prints raw data with no formatting.

func (*RawLogger) CreateBuildLogger added in v0.3.0

func (r *RawLogger) CreateBuildLogger(_ string) Logger

CreateBuildLogger allows RawLogger to implement logger.Factory.

func (*RawLogger) CreateContainerLogger added in v0.3.0

func (r *RawLogger) CreateContainerLogger(_ string) Logger

CreateContainerLogger allows RawLogger to implement logger.Factory.

func (*RawLogger) CreatePullLogger added in v0.3.0

func (r *RawLogger) CreatePullLogger(_ string) Logger

CreatePullLogger allows RawLogger to implement logger.Factory.

func (*RawLogger) Err added in v0.3.0

func (r *RawLogger) Err(message []byte)

Err is a no-op function.

func (*RawLogger) ErrWriter added in v0.3.0

func (r *RawLogger) ErrWriter() io.Writer

ErrWriter returns the base writer

func (*RawLogger) Out added in v0.3.0

func (r *RawLogger) Out(message []byte)

Out is a no-op function.

func (*RawLogger) OutWriter added in v0.3.0

func (r *RawLogger) OutWriter() io.Writer

OutWriter returns the base writer

type Wrapper

type Wrapper struct {
	Err    bool
	Logger Logger
}

Wrapper is a wrapper around Logger that implements the Writer interface, mainly use by docker/pkg/stdcopy functions.

func (*Wrapper) Write

func (l *Wrapper) Write(bytes []byte) (int, error)

Jump to

Keyboard shortcuts

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