
22 Dec
2004
22 Dec
'04
10:23 a.m.
Hello, Currently I have a piece of code that logs messages much in the same way as printf() : void MyLogger::dump( const std::string& format, va_list& list ) { const unsigned short buf_size = 1024; char buffer[ buf_size ]; ::memset( buffer, 0, buf_size ); ::_vsnprintf( buffer, buf_size - 1, format.c_str(), list); /.../ } After many headaches (and crashes) due to mistaken format specification fields, I thought to upgrade my class's API to use boost::format, but alas, I couldn't find the way to feed the format object from a va_list. Is there a way? thanks in advance... Dan.