Boost logo

Boost :

From: Peter Bartlett (pete_at_[hidden])
Date: 2019-11-05 17:11:02

>I think it is very counter-intuitive that messages only emerge to the
normal output if there is an error or --log_level="message"
>And that
> #define BOOST_TEST_LOG_LEVEL "message"
>does not appear to have the same effect as --log_level="message"
>which is also surprising, and in my book a buglet?
>I suggest that this behaviour should be changed so that BOOST_TEST_MESSAGE
>*always* produces output.
>Otherwise I am sure I will not be the only person confused.
>At the very least the documentation should highlight that ones expectation
may not match what actually happens.


I think it would be a bad idea to change the default value of --log_level
(in your suggestion, from "error" to "message"). The default has been
"error" for a long time (I don't like to count how long, because it makes me
feel old!). And I'm sure that a lot of parsing tools have been built around
the world assuming Boost.Test output is of a certain form. I know I've had
to 'teach' various CI systems Boost.Test-speak over the years.

> #define BOOST_TEST_LOG_LEVEL "message"

BOOST_TEST_LOG_LEVEL is supported as an environment variable, not as a
macro. Supporting it as a macro would be a bad idea for similar reasons as
above - the layout and volume of the output should be for the *user* to
control not the author of the tests, or otherwise the user can't rely on
what the test output is going to look like from one library to the next.

If you, personally, always want the log_level to be 'message', then you
should set the environment variable BOOST_TEST_LOG_LEVEL permanently on your

Hope that helps,

Boost list run by bdawes at, gregod at, cpdaniel at, john at