[Clp] Log Message printing in Clp (particular for barrier solver)

Kish Shen kisshen at cisco.com
Mon Apr 11 21:17:33 EDT 2011


Hi,

I have been implementing control over the printing of log messages for 
Cbc/Clp solver. I noticed that not all log messages are printed via 
CoinMessageHandler, for example, in ClpPredictorCorrector.cpp, there are 
code like:

     if (nuberGoodTries&&handler_->logLevel()>1) {
	printf("$d centering......

where printf is used instead to print the message, which will be always 
sent to stdout.

This is not ideal for me, because I use CoinMessageHandler to control 
where the messages are sent to (stdout might not even be connected, as 
in when my code use Cbc in GUI).

In the above case, the logLevel is checked before printing, but this is 
not always done, some messages are printed to stdout (or std::cout when 
using C++ style output), without checking the LogLevel, so these 
messages will be unconditionally printed to stdout.

Should these message printings be changed to use the CoinMessageHandler 
interface?

Thanks and cheers,

Kish
-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.




More information about the Clp mailing list