#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/Message.h"
#include "GaudiKernel/GaudiException.h"
#include "GaudiKernel/IMessageSvc.h"
#include <iostream>
#include <stdarg.h>
#include <stdio.h>
Go to the source code of this file.
|
| std::string | format (const char *fmt,...) |
| | MsgStream format utility "a la sprintf(...)".
|
| |
| #define KERNEL_MSGSTREAM_CPP |
| std::string format |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
MsgStream format utility "a la sprintf(...)".
Definition at line 133 of file MsgStream.cpp.
{
const int buffsize = 2048;
static char buffer[buffsize];
va_list arguments;
va_start( arguments, fmt );
if( vsprintf(buffer, fmt, arguments) >= buffsize )
throw GaudiException(
"Insufficient buffer size (2048) when formatting message",
"MsgStream", 0);
return std::string(buffer);
}