Documentation ¶
Overview ¶
Package log provides a simplified interface for interacting with logging systems. The default logger sends messages to os.Stdout unless changed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf logs a Debugf message to the default logger.
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf logs an Errorf message to the default logger.
Types ¶
type Color ¶
type Color struct {
// contains filtered or unexported fields
}
Color write messages to a writer in a k="v" format for all the fields on a single line *with* color!
func (*Color) WithFields ¶
WithFields calls WithFields for the default logger.
type Logger ¶
type Logger interface { // Debugf logs very detailed information. Debugf(format string, args ...interface{}) // Infof logs informative information. Infof(format string, args ...interface{}) // Warnf logs information that suggests something my be wrong. Warnf(format string, args ...interface{}) // Errorf logs information related to an error. Errorf(format string, args ...interface{}) // WithFields creates a new logger that is identical to this // logger but with the given fields added to the field set. WithFields(map[string]interface{}) Logger }
Logger is an interface this package uses to log to loggers that fulfull this interface.
func WithFields ¶
WithFields calls WithFields for the default logger.
type Multi ¶
type Multi struct {
// contains filtered or unexported fields
}
Multi represents a Configurer that uses multiple configurations to provide values.
func (*Multi) WithFields ¶
WithFields calls WithFields for the default logger.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Write write messages to a writer in a k="v" format for all the fields on a single line.
func (*Writer) WithFields ¶
WithFields calls WithFields for the default logger.