diff --git a/backend.go b/backend.go index db5d365..e1e21d6 100644 --- a/backend.go +++ b/backend.go @@ -22,6 +22,8 @@ type Backend interface { // Backend to write in file-like objects // +var _ Backend = &FileBackend{} + // FileBackend is a backend that writes to a file. type FileBackend struct { formatter Formatter @@ -130,6 +132,8 @@ func (b *FileBackend) Close() error { // Noop Backend // +var _ Backend = &NoopBackend{} + // NoopBackend does nothing and discards all log entries without writing them anywhere. type NoopBackend struct{} @@ -144,7 +148,7 @@ func (*NoopBackend) Write(_ *Record) error { } // SetFormatter is a noop. -func (*NoopBackend) SetFormatter(_ *Formatter) {} +func (*NoopBackend) SetFormatter(_ Formatter) {} // SetLevel is a noop. func (*NoopBackend) SetLevel(_ Level) {} diff --git a/backend_syslog_linux.go b/backend_syslog_linux.go index ad23339..7ab650a 100644 --- a/backend_syslog_linux.go +++ b/backend_syslog_linux.go @@ -16,6 +16,8 @@ var errUnknownFacility = errors.New("unknown facility") // Syslog Backend // +var _ Backend = &SyslogBackend{} + // SyslogBackend writes the logs to a syslog system. type SyslogBackend struct { w *syslog.Writer