Hacker News new | past | comments | ask | show | jobs | submit login
Any recommendation for structured logging library in Golang?
2 points by chrislusf on Nov 17, 2020 | hide | past | favorite | 4 comments
I am considering moving from glog to structured logging. I tried logrus. But it is missing file name and line number by default. I could not find a good 3rd party plugin for this either.

I just want to show 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.

Please let me know the one you actually use.




According to my experience go-kit logger is the best https://github.com/go-kit/kit/tree/master/log. Simple and efficient.


Do you have an example of this format:

[timestamp] [filename:line_number] message k1=v1 k2=v2 ...


Thanks a lot! Switching to it!


uber/zap is highly regarded and used




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: