Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

日志系统

License

NotificationsYou must be signed in to change notification settings

issue9/logs

Repository files navigation

高性能日志库

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 文件中找到。


[8]ページ先頭

©2009-2025 Movatter.jp