observation

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LevelLogger

type LevelLogger interface {
	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Printf(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})

	Debug(args ...interface{})
	Info(args ...interface{})
	Print(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Fatal(args ...interface{})

	Debugln(args ...interface{})
	Infoln(args ...interface{})
	Println(args ...interface{})
	Warnln(args ...interface{})
	Errorln(args ...interface{})
	Fatalln(args ...interface{})
}

LevelLogger contains common functions for printing logs at different levels

type LogObservation

type LogObservation struct {
	LevelLogger
}

func (*LogObservation) End

func (l *LogObservation) End(args ...interface{})

func (*LogObservation) Endf

func (l *LogObservation) Endf(format string, args ...interface{})

func (*LogObservation) Endln

func (l *LogObservation) Endln(args ...interface{})

type Logger

type Logger interface {
	LevelLogger
	// Endf logs and exits successfully (e.g. exit 0)
	Endf(format string, args ...interface{})
	// End logs and exits successfully (e.g. exit 0)
	End(args ...interface{})
	// Endln logs and exits successfully (e.g. exit 0)
	Endln(args ...interface{})
}

type ObservationContainer

type ObservationContainer struct {
	Logger
	OutputWriter
}

func New

func New(levelLogger LevelLogger) *ObservationContainer

type OutputWriter added in v0.5.0

type OutputWriter interface {
	io.Writer
}

Jump to

Keyboard shortcuts

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