1 // Package term provides tools for logging to a terminal.
7 "github.com/go-kit/kit/log"
10 // NewLogger returns a Logger that takes advantage of terminal features if
11 // possible. Log events are formatted by the Logger returned by newLogger. If
12 // w is a terminal each log event is colored according to the color function.
13 func NewLogger(w io.Writer, newLogger func(io.Writer) log.Logger, color func(keyvals ...interface{}) FgBgColor) log.Logger {
17 return NewColorLogger(NewColorWriter(w), newLogger, color)