Re: [go-nuts] Any recommendation for structured logging library in Golang?

2020-11-18 Thread Chris Lu
On Tue, Nov 17, 2020 at 11:20 PM Gopal M wrote: > go.uber.org/zap > > I have tried uber/zap, which has a verbose json: {time="...", file="abc.go", line="32", message="xafasdfasdf", k1=v1, k2=v2} The extra "time=" and "file=" on every single log line are what I want to avoid. Do you have some

Re: [go-nuts] Any recommendation for structured logging library in Golang?

2020-11-17 Thread Gopal M
go.uber.org/zap On Wed, Nov 18, 2020 at 12:48 PM Mike Spreitzer wrote: > > From: ChrisLu > > To: golang-nuts > > Date: 11/17/2020 11:22 PM > > Subject: [EXTERNAL] [go-nuts] Any recommendation for structured > > logging library in Golang? > > Sent by: golan

Re: [go-nuts] Any recommendation for structured logging library in Golang?

2020-11-17 Thread Mike Spreitzer
> From: ChrisLu > To: golang-nuts > Date: 11/17/2020 11:22 PM > Subject: [EXTERNAL] [go-nuts] Any recommendation for structured > logging library in Golang? > Sent by: golang-nuts@googlegroups.com > > I am considering moving from glog to structured logging. I tried &g

[go-nuts] Any recommendation for structured logging library in Golang?

2020-11-17 Thread ChrisLu
I am considering moving from glog to structured logging. I tried logrus, go-kit, uber/zap, but could not find one good fit. In short, this is the desired format: [info][timestamp] [filename:line_number] message k1=v1 k2=v2 ... It shows the correct file name(need to pop out a few call stacks)