Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Test] Controlling Windows debug trace output
From: Alexander Lamaison (awl03_at_[hidden])
Date: 2009-07-16 06:08:03


On Thu, 16 Jul 2009 06:30:22 +0000 (UTC), Gennadiy Rozental wrote:

> Alexander Lamaison <awl03 <at> doc.ic.ac.uk> 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net