Logging with the context package

This recipe will demonstrate a way to pass log fields between various functions. The Go pkg/context package is an excellent way to pass additional variables and cancellations between functions. This recipe will explore using this functionality to distribute variables between functions for logging purposes.

This style can be adapted to logrus or apex from the previous recipe. We'll use apex for this recipe.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.1.158