Printing log message and/or writing log libraries is relatively easy, maintaining the logging infrastructure is a complex task.
- Everything which is essential to understand our application's behaviour.
- Logging can be a bottleneck to performance-centric APIs.
- Use
log.Criticalf
explicitly in the business logic layer only. - Use
log.Debugf
in the controllers/handlers whenever you want to.