flâneur — a map of the web's best reading

Tracing: structured logging, but better in every way | Andy Dote

andydote.co.uk · 3,343 words · saved by 1 readers

It is no secret that I am not a fan of logs; I’ve baited (rapala in work lingo. Rapala is a Finnish brand of fishing lure, and used to mean baiting in this context) discussion in our work chat with things like: If you’re writing log statements, you’re doing it wrong. This is a pretty incendiary statement, and while there has been some good discussion after, I figured it was time to write down why I think logs are bad, why tracing should be used instead, and how we get from one to the other. Hopefully, with less clickbait. Step 3 will shock you, though. First, lets breakdown what I see as the key differences between logging and tracing code. If you want the practical example and want to skip this wall of text, click here. There is also a short Question and Answer at the end. Log Levels are meaningless. Is a log line debug, info, warning, error, fatal, or some other shade in between? The only time I have seen this well managed was when we had 3 descriptions: However, this has issues; a t

It is no secret that I am not a fan of logs; I've baited ( rapala in work lingo. Rapala is a Finnish brand of fishing lure, and used to mean baiting in this context) discussion in our work chat with things like: If you're writing log statements, you're doing it wrong. This is a pretty incendiary statement, and while there has been some good discussion after, I figured it was time to write down why I think logs are bad, why tracing should be used instead, and how we get from one to the other. Hopefully, with less clickbait. Step 3 will shock you, though. Logs vs Traces # First, lets breakdown w

Explore this link on the map →

related reading