Update go-restful dependency

This commit is contained in:
mbohlool
2017-04-21 14:56:01 -07:00
parent cc1f9f7254
commit ea042c6ca0
62 changed files with 360 additions and 182 deletions

View File

@@ -5,7 +5,7 @@ import (
"os"
)
// Logger corresponds to a minimal subset of the interface satisfied by stdlib log.Logger
// StdLogger corresponds to a minimal subset of the interface satisfied by stdlib log.Logger
type StdLogger interface {
Print(v ...interface{})
Printf(format string, v ...interface{})
@@ -18,14 +18,17 @@ func init() {
SetLogger(stdlog.New(os.Stderr, "[restful] ", stdlog.LstdFlags|stdlog.Lshortfile))
}
// SetLogger sets the logger for this package
func SetLogger(customLogger StdLogger) {
Logger = customLogger
}
// Print delegates to the Logger
func Print(v ...interface{}) {
Logger.Print(v...)
}
// Printf delegates to the Logger
func Printf(format string, v ...interface{}) {
Logger.Printf(format, v...)
}