// Assume you have a Zap logger
type ZapAdapter struct {
*zap.SugaredLogger
}
// Implement the SimpleLogger interface methods
func (z *ZapAdapter) Debug(msg any, args ...any) { z.Debugf(fmt.Sprint(msg), args...) }
func (z *ZapAdapter) Info(msg any, args ...any) { z.Infof(fmt.Sprint(msg), args...) }
func (z *ZapAdapter) Warn(msg any, args ...any) { z.Warnf(fmt.Sprint(msg), args...) }
func (z *ZapAdapter) Error(msg any, args ...any) { z.Errorf(fmt.Sprint(msg), args...) }
// ... implement GetLevel/SetLevel etc.
// Usage
client, _ := telegram.NewClient(telegram.ClientConfig{
Logger: telegram.WrapSimpleLogger(&ZapAdapter{logger}),
})