logger

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogLevel

type LogLevel int
const (
	DEBUG LogLevel = iota
	INFO
	ERROR
	FATAL
)

func LogLevelFromString

func LogLevelFromString(logLevel string) LogLevel

type Logger

type Logger interface {
	Info(string, ...interface{})
	Debug(string, ...interface{})
	Error(string, error, ...interface{})
}

func NewLogger

func NewLogger(minLogLevel LogLevel) Logger

func NewTestLogger

func NewTestLogger(writer io.Writer) Logger

type Sink

type Sink interface {
	//Log to the sink.  Best effort -- no need to worry about errors.
	Log(level LogLevel, payload []byte)
}

A Sink represents a write destination for a Logger. Based off https://github.com/pivotal-golang/lager

Jump to

Keyboard shortcuts

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