Documentation ¶
Overview ¶
Package logging contains some basic loggin setup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Colors = [...]*color.Color{ logg.LevelDebug: color.New(color.FgWhite), logg.LevelInfo: color.New(color.FgBlue), logg.LevelWarn: color.New(color.FgYellow), logg.LevelError: color.New(color.FgRed), }
Colors mapping.
View Source
var Strings = [...]string{ logg.LevelDebug: "•", logg.LevelInfo: "•", logg.LevelWarn: "•", logg.LevelError: "⨯", }
Strings mapping.
Functions ¶
func FormatBuildDuration ¶
FormatBuildDuration formats a duration to a string on the form expected in "Total in ..." etc.
func IsTerminal ¶
IsTerminal return true if the file descriptor is terminal and the TERM environment variable isn't a dumb one.
func NewDefaultHandler ¶
NewDefaultHandler handler.
Types ¶
type DefaultHandler ¶
type DefaultHandler struct { Padding int // contains filtered or unexported fields }
Default Handler implementation. Based on https://github.com/apex/log/blob/master/handlers/cli/cli.go
type NoColoursHandler ¶
type NoColoursHandler struct {
// contains filtered or unexported fields
}
func NewNoColoursHandler ¶
func NewNoColoursHandler(outWriter, errWriter io.Writer) *NoColoursHandler
NewNoColoursHandler creates a new NoColoursHandler
Click to show internal directories.
Click to hide internal directories.