There are many logging libraries in Go, however, most of them are not that handy if you have used logger in other languages (Java, C++), the performance is not good as well (i.e. using runtime to get stack and obtain line number). In this post we will walk through code of popular go logging libraries like builtin log package, logrus, zap (fast), apex/log etc, and talk about what makes them fast/slow, some gotcha in the go language itself. At last we will proposal our new design for gommon/log while the previous version is mostly modeled after logrus, the new version is more Java-ish.
Type
Related
7 Ayi, where gommon/log first comes to play
Description
There are many logging libraries in Go, however, most of them are not that handy if you have used logger in other languages (Java, C++), the performance is not good as well (i.e. using runtime to get stack and obtain line number). In this post we will walk through code of popular go logging libraries like builtin log package, logrus, zap (fast), apex/log etc, and talk about what makes them fast/slow, some gotcha in the go language itself. At last we will proposal our new design for gommon/log while the previous version is mostly modeled after logrus, the new version is more Java-ish.
Update