Created
July 3, 2019 12:41
-
-
Save jfeng45/e4ff69ce161fec0a78cd89cd5ac82d71 to your computer and use it in GitHub Desktop.
generic logger interface
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
// Log is a package level variable, every program should access logging function through "Log" | |
var Log Logger | |
// Logger represent common interface for logging function | |
type Logger interface { | |
Errorf(format string, args ...interface{}) | |
Fatalf(format string, args ...interface{}) | |
Fatal(args ...interface{}) | |
Infof(format string, args ...interface{}) | |
Info( args ...interface{}) | |
Warnf(format string, args ...interface{}) | |
Debugf(format string, args ...interface{}) | |
Debug(args ...interface{}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment