From aec2edb4413a7259aee8b80c09822036adcb0957 Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Fri, 22 Feb 2019 21:27:54 +0100 Subject: [PATCH] Match the interface to logrus implementation --- pkg/log/logger.go | 4 ++-- pkg/log/logrus.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/log/logger.go b/pkg/log/logger.go index bf276f48..18de32aa 100644 --- a/pkg/log/logger.go +++ b/pkg/log/logger.go @@ -6,8 +6,8 @@ package log // Logger serves as an adapter interface for logger libraries // so that dex does not depend on any of them directly. type Logger interface { - Info(msg string) - Warn(msg string) + Info(args ...interface{}) + Warn(args ...interface{}) Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) diff --git a/pkg/log/logrus.go b/pkg/log/logrus.go index c7acd6b2..839f79e6 100644 --- a/pkg/log/logrus.go +++ b/pkg/log/logrus.go @@ -15,13 +15,13 @@ func NewLogrusLogger(logger logrus.FieldLogger) *LogrusLogger { } // Info logs an Info level event. -func (l *LogrusLogger) Info(msg string) { - l.logger.Info(msg) +func (l *LogrusLogger) Info(args ...interface{}) { + l.logger.Info(args...) } // Warn logs a Warn level event. -func (l *LogrusLogger) Warn(msg string) { - l.logger.Warn(msg) +func (l *LogrusLogger) Warn(args ...interface{}) { + l.logger.Warn(args...) } // Debugf formats and logs a Debug level event.