Created
January 27, 2023 09:37
-
-
Save arriqaaq/76a3cacbf747870485f955d799a424a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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