Logging in a Rust Application

This blog post is part of a series I’m developing documenting my evolution as a Rust developer. Currently I’m a newbie, but I’m making progress. As a newbie, please feel free in the comments to elaborate on what I might be doing wrong, could do better or is not “canonical” Rust. Logging is obviously a key aspect of a production-ready application. While one could use println! or dbg! or similar Rust macros to achieve something similar, they are not really a replacement for a real logging framework. In fact, particularly for (long running) “services” as opposed to CLIs, many architecture/coding standards prohibit use of the equivalent to println! in whatever language you’re using. I myself have set such standards on projects I’ve lead. ...

April 7, 2024 · 4 min · Ray Suliteanu