The package level logger anti pattern

This post is a spin-off from various conversations around improving (I’m trying not to say standardising, otherwise I’ll have to link to XKCD) the way logging is performed in Go projects. Consider this familiar pattern for establishing a package level log variable. package foo import “mylogger” var log = mylogger.GetLogger(“github.com/project/foo”) What’s wrong with this pattern? The first problem … Continue reading The package level logger anti pattern