Closed lthibault closed 2 years ago
+1 yamux.Config.LogOutput takes an io.Writer and can be used as a workaround, but it seems to make more sense to have yamug.Config.Logger take an interface.
Agree, but this is incompatible update.
@gonejack are you sure? People using a *log.Logger
should be able to assign it just as before, since it matches the new interface.
At present,
yamux.Config.Logger
is a pointer to a concrete struct. This makes it impossible to use popular libraries such as https://github.com/sirupsen/logrus.Fortunately, most logging libraries implicitly satisfy the following interface:
Config
should take an interface like the one above in lieu of*log.Logger
.