December 2017
Intermediate to advanced
316 pages
6h 58m
English
In this section, let us learn how to add transport-level logging and application-level logging to our Go Kit microservices. We use the above example but modify it a little bit. Let us call our new project encryptServiceWithLogging. In the GitHub project of this book, you will find this directory. We visited the concepts of middleware many times in this book. For revision, a middleware is a function that tampers the request/response before/after it reaches the respective request handlers. Go Kit allows us to create logging middleware, which we attach to our service. That middleware will have the logging logic. In this example, we try to log to the Stderr (console). Add one new file called middleware.go ...
Read now
Unlock full access