Skip to content

Instantly share code, notes, and snippets.

@arriqaaq
Created January 27, 2023 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arriqaaq/76a3cacbf747870485f955d799a424a3 to your computer and use it in GitHub Desktop.
Save arriqaaq/76a3cacbf747870485f955d799a424a3 to your computer and use it in GitHub Desktop.
type Logger interface {
Println(v ...interface{})
Fatalln(v ...interface{})
}
type Logrus struct {
*logrus.Logger
}
func (l *Logrus) Println(v ...interface{}) {
l.Info(v...)
}
func (l *Logrus) Fatalln(v ...interface{}) {
l.Fatal(v...)
}
type Zap struct {
*zap.SugaredLogger
}
func (z *Zap) Println(v ...interface{}) {
z.Infow("", v)
}
func (z *Zap) Fatalln(v ...interface{}) {
z.Fatalw("", v)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment