[Boost.Test] Controlling Windows debug trace output

I've recently noticed the Boost.Test outputs anything output using the Windows debug trace functions such as ATLTRACE. Thanks for this! This makes these trace functions so much more useful. However, I was wondering if there was some way to control this output. Ideally, I don't want my automoated test runs to output all these tracelines. Is there a flag to the test runnner that will turn them of? Many thanks. Alex Lamaison

Alexander Lamaison
I've recently noticed the Boost.Test outputs anything output using the Windows debug trace functions such as ATLTRACE. Thanks for this! This makes these trace functions so much more useful.
Umm. Err. Not sure what you mean. Last time I checked I've used iostreams operations.
However, I was wondering if there was some way to control this output. Ideally, I don't want my automoated test runs to output all these tracelines. Is there a flag to the test runnner that will turn them of?
What trace lines you refer to? Gennadiy

On Thu, 16 Jul 2009 06:30:22 +0000 (UTC), Gennadiy Rozental wrote:
Alexander Lamaison
writes: I've recently noticed the Boost.Test outputs anything output using the Windows debug trace functions such as ATLTRACE. Thanks for this! This makes these trace functions so much more useful.
Umm. Err. Not sure what you mean. Last time I checked I've used iostreams operations.
However, I was wondering if there was some way to control this output. Ideally, I don't want my automoated test runs to output all these tracelines. Is there a flag to the test runnner that will turn them of?
What trace lines you refer to?
My program uses ATL which provides an ATLTRACE macro (http://msdn.microsoft.com/en-us/library/dhxsse89%28VS.80%29.aspx) which, when given a string, will output this to the 'debug output'. The debug output is not normally printed to the console unless running in the debugger. In order to see it without the debugger you would normally have to use a tool such as DbgView to capture and display it. However, when I test my code using Boost.Test, lo and behold, the trace output appears in the window with the rest of the test log lines. I can't see the implementation of the ATL tracing code but I think all these debug output functions eventually call OutputDebugString(), http://msdn.microsoft.com/en-us/library/aa363362%28VS.85%29.aspx. Alex

Alexander Lamaison wrote:
My program uses ATL which provides an ATLTRACE macro (http://msdn.microsoft.com/en-us/library/dhxsse89%28VS.80%29.aspx) which, when given a string, will output this to the 'debug output'. The debug output is not normally printed to the console unless running in the debugger. In order to see it without the debugger you would normally have to use a tool such as DbgView to capture and display it.
However, when I test my code using Boost.Test, lo and behold, the trace output appears in the window with the rest of the test log lines.
I have some suspicions why this might happen. Can you post simple example illustrating this behavior? Gennadiy

"Gennadiy Rozental"
Alexander Lamaison wrote:
My program uses ATL which provides an ATLTRACE macro (http://msdn.microsoft.com/en-us/library/dhxsse89%28VS.80%29.aspx) which, when given a string, will output this to the 'debug output'. The debug output is not normally printed to the console unless running in the debugger. In order to see it without the debugger you would normally have to use a tool such as DbgView to capture and display it.
I have some suspicions why this might happen. Can you post simple example illustrating this behavior?
This code:
#define BOOST_TEST_MODULE Windows debug trace tests
#include
participants (2)
-
Alexander Lamaison
-
Gennadiy Rozental