For a command line app I use env_logger. At the end of the program I want to know
if there did an error!() happen so that I can exit with an error code <>l to 0.
I tried to use a global variable for this like follows:
In logger.rs where I format the output message I want to use ERROR_OCCURED so that in case the error level is log::Level::Error I can do ERROR_OCCURRED.store(true, Ordering::Relaxed);.
But I have no idea how I can declare ERROR_OCCURED in logger.rs so that I can use it there.
Actually, I tried with crate:: but I had a typo ERROR_OCCURED instead of ERROR_OCCURRED and didn't understand the error message, telling me about similar name and such.