Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger wraps a few log.Logger instances in private fields. They are accessible via their respective methods.
func NewLogger ¶
NewLogger returns a reference to a Logger. We usually call this when initializing cmd.Logger. Later we pass this to client.NewClient so it can also log. By default debug and error go to os.Stderr, and info goes to os.Stdout
func (*Logger) Debug ¶
Debug prints a formatted message to stderr only if debug is set. Consider these messages useful for developers of the CLI. This method wraps log.Logger.Printf
func (*Logger) Error ¶
Error prints a message and the given error's message to os.Stderr This method wraps log.Logger.Print
func (*Logger) Info ¶
func (l *Logger) Info(args ...interface{})
Info prints all args to os.Stdout It's commonly used for messages we want to show the user. This method wraps log.Logger.Print
func (*Logger) Infof ¶
Infof prints a formatted message to stdout This method wraps log.Logger.Printf