Skip to main content

One post tagged with "observability"

View All Tags

From fmt.Println to Production Logging in Fiber v3

ยท 6 min read
Fiber Team
Maintainers

There is a moment in every project's life where someone greps the production logs for a bug report and realizes that fmt.Println("got here") is the only evidence of what happened. The request came in, something went wrong, and the logs show a status code with no context about which user, which endpoint, or which upstream service was involved.

Logging sounds boring until it is 2 AM and your only debugging tool is kubectl logs. At that point, the difference between a flat text line and a structured JSON object with a request ID, latency, and user context is the difference between finding the bug in five minutes and finding it in two hours.

Fiber v3's Logger middleware is designed to bridge that gap without requiring you to rewrite your application.