initial import

This commit is contained in:
kevin
2020-07-26 17:09:05 +08:00
commit 7e3a369a8f
647 changed files with 54754 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
package main
import (
"time"
"zero/core/logx"
)
func foo() {
logx.WithDuration(time.Second).Error("world")
}
func main() {
c := logx.LogConf{
Mode: "console",
Path: "logs",
}
logx.MustSetup(c)
defer logx.Close()
logx.Info("info")
logx.Error("error")
logx.ErrorStack("hello")
logx.Errorf("%s and %s", "hello", "world")
logx.Severef("%s severe %s", "hello", "world")
logx.Slowf("%s slow %s", "hello", "world")
logx.Statf("%s stat %s", "hello", "world")
logx.WithDuration(time.Minute + time.Second).Info("hello")
logx.WithDuration(time.Minute + time.Second).Error("hello")
foo()
}