Re: [go-nuts] Any recommendation for structured logging library in Golang?
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 way to change the log format? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CACJc9-0KdeFrNd6rrxhhL3xqs_ZO3oEMgX41K-9JXn1Xs5ZhpQ%40mail.gmail.com.
Re: [go-nuts] Any recommendation for structured logging library in Golang?
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: golang-nuts@googlegroups.com > > > > 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) > > and line number in a customizable format, not as key-value pair for > > each line which is just too verbose to have the extra "time=" "file=". > > Please let me know the one you actually use. > > > > Thanks! > > Chris > > How about one that has fine-grained debug leveling, like glog or klog, > too? > > Thanks, > Mike > > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/OF42CB2A54.2706B41C-ON85258624.0027F1D3-85258624.00280B00%40notes.na.collabserv.com > . > -- Regards, M. Gopal -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAB-EHXBPQdoyuEz%2BdcswnovUxNgw11Bpg%3DQNh9aT8g1FX%2BWFUA%40mail.gmail.com.
Re: [go-nuts] Any recommendation for structured logging library in Golang?
> 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 > 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) > and line number in a customizable format, not as key-value pair for > each line which is just too verbose to have the extra "time=" "file=". > Please let me know the one you actually use. > > Thanks! > Chris How about one that has fine-grained debug leveling, like glog or klog, too? Thanks, Mike -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/OF42CB2A54.2706B41C-ON85258624.0027F1D3-85258624.00280B00%40notes.na.collabserv.com.
[go-nuts] Any recommendation for structured logging library in Golang?
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) and line number in a customizable format, not as key-value pair for each line which is just too verbose to have the extra "time=" "file=". Please let me know the one you actually use. Thanks! Chris - https://github.com/chrislusf/seaweedfs -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/8f882954-f070-4e2c-b8f9-0831c2fb91c9n%40googlegroups.com.