If you want to go for structured and layered logging in JSON, consider https://github.com/francoispqt/onelog
четверг, 19 ноября 2020 г. в 12:14:21 UTC+3, Denis Cheremisov: > Zerolog does the trick, need a bit of setup though for what you want > > среда, 18 ноября 2020 г. в 07:21:48 UTC+3, 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) 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/0050ca29-a406-4d30-b375-b5d3dd871dban%40googlegroups.com.