add compile checks for StdLogger interface

This commit is contained in:
Antoine Grondin 2015-09-07 20:49:55 -04:00
parent 38c9fd2510
commit a2f80bd9c0
1 changed files with 5 additions and 1 deletions

View File

@ -74,7 +74,11 @@ const (
)
// Won't compile if StdLogger can't be realized by a log.Logger
var _ StdLogger = &log.Logger{}
var (
_ StdLogger = &log.Logger{}
_ StdLogger = &Entry{}
_ StdLogger = &Logger{}
)
// StdLogger is what your logrus-enabled library should take, that way
// it'll accept a stdlib logger and a logrus logger. There's no standard