Fix Logger interface.
This commit is contained in:
parent
d6c5360a06
commit
afef3eea62
|
@ -20,6 +20,8 @@ func (fl *File) Close() error {
|
||||||
if fl.fe != nil {
|
if fl.fe != nil {
|
||||||
return fl.fe.Close()
|
return fl.fe.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFile creates a new Logger that writes all logs to the file
|
// NewFile creates a new Logger that writes all logs to the file
|
||||||
|
|
|
@ -21,7 +21,7 @@ type Logger interface {
|
||||||
Status() error
|
Status() error
|
||||||
|
|
||||||
// Close gives the Logger the opportunity to perform any cleanup.
|
// Close gives the Logger the opportunity to perform any cleanup.
|
||||||
Close()
|
Close() error
|
||||||
|
|
||||||
// Log messages consist of four components:
|
// 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.
|
// Close is a no-op that satisfies the Logger interface.
|
||||||
func (lw *LogWriter) Close() {}
|
func (lw *LogWriter) Close() error { return nil }
|
||||||
|
|
Loading…
Reference in New Issue