macro_rules! infob {
($fmt:literal, $e:expr) => { ... };
}
Expand description
Evaluates a given expression with conditional logging of informational messages based on the current log level.
This macro checks if the logging level is set to 3 or higher, indicating verbose output. If the condition is met, it formats a log message with a custom indentation and colored “INFO” prefix, appending the source file name and line number. The macro uses thread-local storage to manage log indentation, ensuring that nested logging maintains a consistent structure. It then executes the provided expression while temporarily adjusting the indentation, allowing for nested operations to be clearly delineated in the log output. If the log level is below 3, the expression is evaluated without additional logging.