Hi Blaise, > This isn't directly an answer to your question, but have you > considered packaging your std::ostringstream work into a function? > If you do > > ROS_DEBUG("My aseba message: %s", aseba_to_str(my_aseba)); > > then aseba_to_str() will only get called when the logging level is > set to debug. This is indeed a good solution, it will do it :-) Thank you, all the best, Stéphane -- Dr Stéphane Magnenat http://stephane.magnenat.net