logger

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2016 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	Create(name string) Logger
}

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

type Logger

type Logger interface {
	Out(bytes []byte)
	Err(bytes []byte)
}

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) Create

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

Create implements logger.Factory and returns a NullLogger.

func (*NullLogger) Err

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

Err is a no-op function.

func (*NullLogger) Out

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

Out is a no-op function.

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