glg是简单的golang记录库 要求 转到1.11 安装 go get github.com/kpango/glg 例子 package main import ( "net/http" "time" "github.com/kpango/glg" ) // NetWorkLogger sample network logger type NetWorkLogger struct {} func ( n NetWorkLogger ) Write ( b [] byte ) ( int , error ) { // http.Post("localhost:8080/log", "", bytes.NewReader(b)) http . Get ( "http://127.0.0.1:8080/log" ) glg . Success ( "Requested" ) gl