News for hackers. Stuff that matters.
Re:Instrumentation in Go by philosopher1234 on Tuesday May 26, 2020 @01:21PM (#23313854)
Doing this is going to make navigating your code harder for little gain. It’s ok to put logging next to business logic. If you do this and actually follow through with it you can end up with a dozen wrapping classes with only one business logic class. I’ve seen this at my work. It makes debugging/finding/mutating the business class harder because you have to figure out which class you actually care about and how the classes were organized when they were constructed. Just make 1 class. It’ll save you plenty of code and be easier to understand/read.

There are no comments on this comment yet.