rust - How to initialize the logger for integration tests? -


i have crate production code in src directory , integration tests in tests directory. production code uses log macros.

i init global logger when running integration tests (e.g. env_logger::init().unwrap();) there several tests , test order not defined, don't know in test should put initialize command.

is there way can nicely? perhaps overriding tests main function?

there's no way kind of thing built-in right now.

you can write macro inserts sort of initialization call before each test, that's close there is.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -