We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
日志系统
高性能日志库
goos: darwingoarch: amd64pkg: github.com/imkira/go-loggers-benchcpu: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHzBenchmarkLogsTextPositive-4 100000000 320.9 ns/op 40 B/op 2 allocs/opBenchmarkLogsTextNegative-4 1000000000 9.407 ns/op 0 B/op 0 allocs/opBenchmarkLogsJSONNegative-4 1000000000 11.42 ns/op 0 B/op 0 allocs/opBenchmarkLogsJSONPositive-4 65887180 578.6 ns/op 40 B/op 2 allocs/op
import"github.com/issue9/logs/v7"l:= logs.New(logs.NewTextHandler(...))l.DEBUG().Print("debug start...")l.ERROR().AppendAttrs(map[string]interface{}{"k1":"v1"})l.ERROR().Printf("带默认参数 k1=v1")// 不用 With 指定 k1,err 全都自动带上此参数
go get github.com/issue9/logs/v7
本项目采用MIT 开源授权许可证,完整的授权说明可在LICENSE 文件中找到。