gin-contrib / zap

Alternative logging through zap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't use wrapped logger as the logger

reesmanp opened this issue · comments

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.