From afef3eea62c7aaab49f526a1397e5c683534d0cb Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Tue, 21 Nov 2017 12:19:38 -0800 Subject: [PATCH] Fix Logger interface. --- logging/file.go | 2 ++ logging/log.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/logging/file.go b/logging/file.go index 7af8622..fd271ed 100644 --- a/logging/file.go +++ b/logging/file.go @@ -20,6 +20,8 @@ func (fl *File) Close() error { if fl.fe != nil { return fl.fe.Close() } + + return nil } // NewFile creates a new Logger that writes all logs to the file diff --git a/logging/log.go b/logging/log.go index c122239..5c927ea 100644 --- a/logging/log.go +++ b/logging/log.go @@ -21,7 +21,7 @@ type Logger interface { Status() error // Close gives the Logger the opportunity to perform any cleanup. - Close() + Close() error // Log messages consist of four components: // @@ -276,4 +276,4 @@ func (lw *LogWriter) SetLevel(l Level) { } // Close is a no-op that satisfies the Logger interface. -func (lw *LogWriter) Close() {} +func (lw *LogWriter) Close() error { return nil }