package log import "github.com/pkg/errors" type Handler interface { Log(level, msg string) Close() error } type Handlers []Handler func (hs Handlers) Log(level, msg string) { for _, h := range hs { h.Log(level, msg) } } func (hs Handlers) Close() (err error) { for _, h := range hs { if err = h.Close(); err != nil { err = errors.WithStack(err) } } return }