| # Gaudi Framework, version v20r3
Generated: 24 Nov 2008

# MsgStream.cpp File Reference

`#include "GaudiKernel/MsgStream.h"`
`#include "GaudiKernel/Message.h"`
`#include "GaudiKernel/GaudiException.h"`
`#include "GaudiKernel/IMessageSvc.h"`
`#include <iostream>`
`#include <stdarg.h>`
`#include <stdio.h>`

Include dependency graph for MsgStream.cpp:

Go to the source code of this file.

## Defines
#define | KERNEL_MSGSTREAM_CPP
## Functions
std::string | format (const char *fmt,...)
| MsgStream format utility "a la sprintf(...)".

## Define Documentation

#define KERNEL_MSGSTREAM_CPP

Definition at line 19 of file MsgStream.cpp.

## Function Documentation

std::string format | ( | const char * | fmt,
|  |  | ... |
| ) |  |  |

MsgStream format utility "a la sprintf(...)".

Definition at line 96 of file MsgStream.cpp.

    00097 {
    00098   const int buffsize = 2048;
    00099   static char buffer[buffsize];
    00100   va_list arguments;
    00101   va_start( arguments, fmt );
    00102   if( vsprintf(buffer, fmt, arguments) >= buffsize )
    00103     throw GaudiException("Insufficient buffer size (2048) when formatting message",
    00104                          "MsgStream", 0);
    00105   return std::string(buffer);
    00106 }