logging

Crypto triangle arbitrage dashboard, part 3: how to add logging

Logging to a storage medium is useful for troubleshooting and analysis when any note-worthy events have occurred. In this article, we will do a quick update to the code base we created in part 1: Crypto triangle arbitrage dashboard: how to, part 1 to add logging to a file for our rust backend. We will add logging to stdout and a file making use of the log4rs crate. For details on how to use log4rs please check out my article about basic file logging with log4rs. Prerequisites Since we are updating the existing code base for the crypto triangle arbitrage…

Basic how to log to a file in Rust with log4rs

In this article, we will take look at how you can use and configure log4rs to log to a file in your Rust program. Specifically, we will look at some of the options using YAML to configure the logging. What is log4rs From the crate description: “log4rs is a highly configurable logging framework modeled after Java’s Logback and log4j libraries.” For the log4rs crate’s page click here. Why log4rs What is good about log4rs? It offers an easy way to log to a file and it is highly configurable using a YAML config file, as well as through code. However,…