Member-only story
The Right Way To Implement A Log Listener
2 min readFeb 17, 2023
I am going to show you the right way to implement a log listener using Google’s wrong way to do, as some at Google are extremely lazy.
Log Listener, The Wrong Way
So let’s see an example of a log listener implemented the wrong way:
And that is from the Go Router package examples:
So what is wrong? Well, let me show you:
That e is not error, as it’s e for log event. The problem is it’s not enough details of the log event and in the case of an error the is no way to get…