libcompose: github.com/docker/libcompose/logger Index | Files

package logger

import "github.com/docker/libcompose/logger"

Index

Package Files

null.go raw_logger.go types.go

type Factory Uses

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 Uses

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 Uses

type NullLogger struct {
}

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

func (*NullLogger) CreateBuildLogger Uses

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

CreateBuildLogger allows NullLogger to implement logger.Factory.

func (*NullLogger) CreateContainerLogger Uses

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

CreateContainerLogger allows NullLogger to implement logger.Factory.

func (*NullLogger) CreatePullLogger Uses

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

CreatePullLogger allows NullLogger to implement logger.Factory.

func (*NullLogger) Err Uses

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

Err is a no-op function.

func (*NullLogger) ErrWriter Uses

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

ErrWriter returns the base writer

func (*NullLogger) Out Uses

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

Out is a no-op function.

func (*NullLogger) OutWriter Uses

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

OutWriter returns the base writer

type RawLogger Uses

type RawLogger struct {
}

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

func (*RawLogger) CreateBuildLogger Uses

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

CreateBuildLogger allows RawLogger to implement logger.Factory.

func (*RawLogger) CreateContainerLogger Uses

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

CreateContainerLogger allows RawLogger to implement logger.Factory.

func (*RawLogger) CreatePullLogger Uses

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

CreatePullLogger allows RawLogger to implement logger.Factory.

func (*RawLogger) Err Uses

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

Err is a no-op function.

func (*RawLogger) ErrWriter Uses

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

ErrWriter returns the base writer

func (*RawLogger) Out Uses

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

Out is a no-op function.

func (*RawLogger) OutWriter Uses

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

OutWriter returns the base writer

type Wrapper Uses

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 Uses

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

Package logger imports 3 packages (graph) and is imported by 65 packages. Updated 2016-07-19. Refresh now. Tools for package owners.