logger

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2016 License: Apache-2.0 Imports: 0 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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