Logging

All user facing applications should display information to the user whether it's information to warn them of a minor failure, display application breaking errors, or displaying debugging information. The Rust crate ecosystem has many different types of logging crates that can help.

Log Level
The log level also known as the maximum log level, for a logging application dictates the displayed level of messages for the current runtime of an application. The maximum log level is generally an integer value or enumeration corresponding to the level of output, all log levels below the set maximum value are enabled.

Log
Majority of Rust crates for logging are implementations of Log, which exposes 5 Macros that are used similarly to println

A logging implementation must be used otherwise Log falls back to a "noop" implementation that ignores all log messages.

It's possible to specify the target event that caused a specific logging message

Environment Loggers
Environment loggers allow for configuring the output level based upon variables set in your user environment.