Closed hangvane closed 1 year ago
Maybe you could try make ut-nextest
, it uses cargo nextest which may provide better output than cargo test.
Maybe you could try
make ut-nextest
, it uses cargo nextest which may provide better output than cargo test.
It works. Thanks!
Seems that there's no easy way to show the logger output in unit test for debugging currently, even with the command arg
--nocapture
:flexi-logger
has supported output in unit test since 0.25.3, so we can initializeflexi_logger
in test:Maybe a more elegant way is to reuse
src/logger.rs#setup_logging()
. But thelogger.rs
is placed in root packagenydus-rs
that cannot call from child packages such asnydus-storage
. Movelogger.rs
tonydus-utils
seems to be a good way.