drone / drone-runtime

[DEPRECATED] migrated to https://github.com/drone-runners
Other
62 stars 43 forks source link

Add internal logger package #48

Closed bradrydzewski closed 5 years ago

bradrydzewski commented 5 years ago

We should add an internal logger package similar to go-login. Sometimes we need detailed debugging information and we need a generic way to provide this.

// A Logger represents an active logging object that generates
// lines of output to an io.Writer.
type Logger interface {
    Debug(args ...interface{})
    Debugf(format string, args ...interface{})
    Debugln(args ...interface{})

    Error(args ...interface{})
    Errorf(format string, args ...interface{})
    Errorln(args ...interface{})

    Info(args ...interface{})
    Infof(format string, args ...interface{})
    Infoln(args ...interface{})

    Warn(args ...interface{})
    Warnf(format string, args ...interface{})
    Warnln(args ...interface{})
}

Once enabled we should provide debug logging for Docker and Kubernetes, specifically we need to start with the Docker pull process to verify whether credentials are being properly passed to the Docker daemon when cloning.