You can display a continuous loading animation in the terminal using loading(message). This spawns a background thread that cycles through animation frames.
To stop the animation and clear the line, call .done(). Note that most other logging methods (like success, info, or error) automatically call .done() for you, so you can transition directly from a loading state to a result state.
Important: If you start a loading animation, ensure you eventually call .done() or another logging method to clean up the thread and clear the terminal line.
use paris::Logger;
let mut logger = Logger::new();
logger.loading("Counting to 52!");
// ... perform work ...
// Transitioning directly to success calls .done() automatically
logger.success("Done counting!");