feat: add command line and log

This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ
2022-04-12 13:48:03 +08:00
parent 83102c042e
commit 1d3b7bd214
2 changed files with 152 additions and 0 deletions
+8
View File
@@ -97,3 +97,11 @@ func Warnf(format string, v ...interface{}) {
func Debugf(format string, v ...interface{}) {
formatLogger.doLogf(LevelDebug, format, v...)
}
// NewSugaredLogger(os.Stdout, DebugLevel).Configure(func(sl *SugaredLogger) {
// sl.SetName("stdLogger")
// sl.ReportCaller = true
// // auto enable console color
// sl.Formatter.(*TextFormatter).EnableColor = color.SupportColor()
// sl.Formatter.SetCallerSkip(1)
// })