diff --git a/controller/controller.go b/controller/controller.go index b544ab0..6bb4b06 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -57,12 +57,12 @@ func (c *Config) defaults() error { } if c.MetricsRecorder == nil { - c.Logger.Warningf("controller metrics disabled") + c.Logger.Warnf("controller metrics disabled") c.MetricsRecorder = metrics.Dummy } if c.Name == "" { - c.Logger.Warningf("controller configured without name") + c.Logger.Warnf("controller configured without name") } if c.ListerWatcher == nil { @@ -236,7 +236,7 @@ func (c *Controller) retryIfRequired(id string, err error) { retries, ok := c.objectCache.getRetries(id) if err != nil && ok && retries < c.cfg.MaxRetries { // Enqueue again for a new retry. - c.logger.Warningf("retrying (%d/%d) due to an error processing object %s: %s", retries+1, c.cfg.MaxRetries, id, err) + c.logger.Warnf("retrying (%d/%d) due to an error processing object %s: %s", retries+1, c.cfg.MaxRetries, id, err) c.objectCache.incRetry(id) c.enqueueObject(id) return diff --git a/log/log.go b/log/log.go index 410e81c..607063a 100644 --- a/log/log.go +++ b/log/log.go @@ -8,7 +8,7 @@ import ( // Logger knows how to log messages in the go fmt style. type Logger interface { Infof(format string, args ...interface{}) - Warningf(format string, args ...interface{}) + Warnf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Debugf(format string, args ...interface{}) } @@ -18,10 +18,10 @@ var Dummy = &dummy{} type dummy struct{} -func (dummy) Infof(format string, args ...interface{}) {} -func (dummy) Warningf(format string, args ...interface{}) {} -func (dummy) Errorf(format string, args ...interface{}) {} -func (dummy) Debugf(format string, args ...interface{}) {} +func (dummy) Infof(format string, args ...interface{}) {} +func (dummy) Warnf(format string, args ...interface{}) {} +func (dummy) Errorf(format string, args ...interface{}) {} +func (dummy) Debugf(format string, args ...interface{}) {} // Std satisfies Logger interface using the standard go logger. type Std struct { @@ -33,8 +33,8 @@ func (s Std) Infof(format string, args ...interface{}) { log.Printf(fmt.Sprintf("[INFO] %s \n", format), args...) } -// Warningf satisfies Logger interface. -func (s Std) Warningf(format string, args ...interface{}) { +// Warnf satisfies Logger interface. +func (s Std) Warnf(format string, args ...interface{}) { log.Printf(fmt.Sprintf("[WARN] %s \n", format), args...) }