Can't use wrapped logger as the logger
reesmanp opened this issue · comments
Paul Reesman commented
ZapLogger is defined as having Info and Error methods. I have a wrapper around zap that I want to pass in which works except line 116 of zap.go attempts to cast as a literal zap logger. Why have the interface if what you're going to do disallows it? My suggestions are to either expand the interface to add the Log method as part of it so you don't need to cast or instead of calling Error on line 120, call info.