Skip to Content
Hands-On Microservices with Kubernetes
book

Hands-On Microservices with Kubernetes

by Gigi Sayfan
July 2019
Intermediate to advanced
502 pages
14h
English
Packt Publishing
Content preview from Hands-On Microservices with Kubernetes

Using a logging middleware

Let's think about where we want to instantiate our logger and then where we want to use it and log messages. This is important because we need to make sure that the logger is available to all the places in the code that need to log messages. A trivial approach is to just add a logger parameter to all our interfaces and propagate the logger in this way. However, this is very disruptive and will violate our clean object model. Logging is really an implementation and operational detail. Ideally, it should not appear in our object model types or interfaces. Also, it is a Go-kit type and, so far, we've managed to keep our object model and even our domain packages totally oblivious to the fact that they are wrapped by ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kubernetes Microservices

Kubernetes Microservices

Richard Chesterwood
Cloud Native DevOps with Kubernetes

Cloud Native DevOps with Kubernetes

John Arundel, Justin Domingus
Microservices: Up and Running

Microservices: Up and Running

Ronnie Mitra, Irakli Nadareishvili

Publisher Resources

ISBN: 9781789805468Supplemental Content