Documentation
¶
Overview ¶
Package log provides an interface for a generic logging solution for Go projects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfoLogger ¶
type InfoLogger interface {
// Infof logs a formatted non-error message.
Infof(format string, args ...interface{})
}
An InfoLogger represents the ability to log informational messages.
type Logger ¶
type Logger interface {
// All Loggers implement InfoLogger. Calling InfoLogger methods directly on
// a Logger value is equivalent to calling them on a V(1) InfoLogger. For
// example, logger.Info() produces the same result as logger.V(1).Info.
InfoLogger
// Error logs an error message. This is behaviorally akin to fmt.Println.
Error(args ...interface{})
// Errorf logs a formatted error message.
Errorf(format string, args ...interface{})
// V returns an InfoLogger value for a specific verbosity level. A higher
// verbosity level means a log message is less important.
V(level int) InfoLogger
// NewWithPrefix returns a Logger which prefixes all messages.
WithPrefix(prefix string) Logger
}
A Logger represents the ability to log informational and error messages.
Click to show internal directories.
Click to hide internal directories.