I have a crate with production code in the src
directory and integration tests in the tests
directory. The production code uses log
macros.
I would like to init a global logger when running the integration tests (e.g. env_logger::init().unwrap();
)
There are several tests and the test order is not defined, so I don't know in which test I should put the initialize command.
Is there any way I can do this nicely? Perhaps by overriding the tests main
function?