dyweb / blog

Dongyue Tech Blog
https://blog.dongyueweb.com
14 stars 7 forks source link

[post] Survey of existing Go logging libraries #28

Open at15 opened 6 years ago

at15 commented 6 years ago

Type

Related

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