httplog:具有结构化日志记录功能的Go HTTP请求记录器

时间:2021-05-08 10:37:16
【文件属性】:
文件名称:httplog:具有结构化日志记录功能的Go HTTP请求记录器
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-08 10:37:16
Go httplog 小型但功能强大的结构化日志记录包,用于Go中的HTTP请求记录。 例子 (请参见 ) package main import ( "net/http" "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" "github.com/go-chi/httplog" ) func main () { // Logger logger := httplog . NewLogger ( "httplog-example" , httplog. Options { JSON : true , }) // Service r := chi . NewRouter () r . Use ( httplog . RequestLogger ( logger ))
【文件预览】:
httplog-master
----_example()
--------main.go(1KB)
----httplog.go(6KB)
----config.go(2KB)
----go.sum(1KB)
----README.md(1KB)
----util.go(745B)
----go.mod(149B)

网友评论