Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogLevel ¶
type LogLevel int
LogLevel represents the levels at which logs are written and rendered.
func LogLevelFromString ¶
LogLevelFromString returns a LogLevel for the provided logLevel string. It will panic if an unknown logLevel is provided.
type Logger ¶
type Logger interface { Info(string, ...interface{}) Debug(string, ...interface{}) Error(string, error, ...interface{}) }
Logger supports writing messages and arbitrary data at different log levels.
func NewLogger ¶
NewLogger returns a logger writing to stdout whose level is controlled by the provided minLogLevel
func NewTestLogger ¶
NewTestLogger returns a logger writing to the provided writer. Its level is fixed at DEBUG It is primarily used in testing to write to e.g. the GinkgoWriter
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