Contextual Logging In Go

Photo by @borisview on Unsplash

I’ve just woke up and somehow I remember that when I created taboo to trace the error log. And then I think, would it be better if I pass the logger instead of the error log itself?

As the context passed, it will contain a sub-logger that has x-request-id inside it. It'll trace all the requested event from HTTP Handler to the most corner of the function.