Documentation
¶
Overview ¶
Package logging defines the minimal interface that loggers must support to be used by pack.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDebugErrorWriter ¶ added in v0.3.0
GetDebugErrorWriter will return an ErrorWriter, typically stderr if one exists, otherwise the standard logger writer will be returned.
func GetDebugWriter ¶ added in v0.3.0
GetDebugWriter returns a writer See WithDebugWriter
Types ¶
type Logger ¶
type Logger interface {
Debug(msg string)
Debugf(fmt string, v ...interface{})
Info(msg string)
Infof(fmt string, v ...interface{})
Warn(msg string)
Warnf(fmt string, v ...interface{})
Error(msg string)
Errorf(fmt string, v ...interface{})
Writer() io.Writer
}
Logger defines behavior required by a logging package used by pack libraries
type PrefixWriter ¶ added in v0.3.0
type PrefixWriter struct {
// contains filtered or unexported fields
}
PrefixWriter will prefix writes
func NewPrefixWriter ¶ added in v0.3.0
func NewPrefixWriter(w io.Writer, prefix string) *PrefixWriter
NewPrefixWriter writes by w will be prefixed
type WithDebugErrorWriter ¶ added in v0.3.0
WithDebugErrorWriter is an optional interface for loggers that want to support a separate writer for errors and standard logging. the DebugErrorWriter should write to stderr if quiet is false.
type WithDebugWriter ¶ added in v0.3.0
WithDebugWriter is an optional interface what will return a writer that will write raw output if quiet is false.