When you’re writing libraries and applications in Go there is one glaring problem. Logging is all over the place. This is due to there being no standard interface for logging. So, libraries and applications both include logging libraries that are different from each other. This leads to log sprawl.
For example, look in the Kubernetes dependencies and you’ll see references to about 10 different logging libraries. Several do the same thing and they are present just because the libraries use them.
This shouldn’t be the case. Other languages have solved this. Logging should be boring infrastructure. Libraries use an API to log and the implementation that’s used is specified by the application that pulls everything together.
There is a pretty simple way we can do better.
Continue Reading »