Golang日志工具。
- 支持日志级别设置
- 多级别输出
package main
import(
"github.com/swxctx/xlog"
)
funca main(){
// 设置日志级别
xlog.Default.Level = xlog.DebugLevel
xlog.Infof("infof test->%d", xlog.DebugLevel)
xlog.Debugf("debug test->%d", xlog.DebugLevel)
xlog.Warnf("warnf test->%d", xlog.DebugLevel)
xlog.Errorf("error test->%d", xlog.DebugLevel)
xlog.Fatalf("fatalf test->%d", xlog.DebugLevel)
}