neqo icon indicating copy to clipboard operation
neqo copied to clipboard

Don't condition `neqo_common::log::init` on `cfg(test)`

Open larseggert opened this issue 11 months ago • 2 comments

          Turns out we cannot make the initialization conditioned on `cfg(test)`, because before a test uses one of the logging macros, the log init won't happen and there will no output :-(

Originally posted by @larseggert in https://github.com/mozilla/neqo/pull/2291#discussion_r1918257346

larseggert avatar Jan 16 '25 11:01 larseggert

Test case: RUST_LOG=debug cargo nextest run handshake_mlkem768x25519 --no-capture produces no logging output.

When a qdebug! is added to the handshake_mlkem768x25519 test, it does (and not only from that log statement, but from called functions as well.)

larseggert avatar Jan 22 '25 12:01 larseggert

Thanks for testing. Your observations match my understanding. Is the original issue valid?

mxinden avatar Jan 24 '25 15:01 mxinden