Attach a Logger to your Router
·
209 words
·
1 minute read
If you’re working with the net/http
package, you can easily create a router to pass different http calls to different functions.
A logger allows you to keep track of these calls. In this example, we just log the call to the terminal (or stdout).
To use this logger wrap any handlers you have with Logger()
.
|
|