1 #ifndef GAUDIKERNEL_MSGSTREAM_H 2 #define GAUDIKERNEL_MSGSTREAM_H 61 : m_service(msg.m_service),
62 m_active(msg.m_active),
64 m_currLevel(msg.m_currLevel),
65 m_useColors(msg.m_useColors),
66 m_inactCounter(msg.m_inactCounter)
216 long setf(FLAG_TYPE _f, FLAG_TYPE _m) {
222 void clear(STATE_TYPE _i = std::ios_base::failbit) {
247 #if defined(GAUDI_V20_COMPAT) && !defined(G21_NO_ENDREQ) 248 [[deprecated(
"will be removed in v28r1, use endmsg instead, see https://gitlab.cern.ch/gaudi/Gaudi/merge_requests/79")]]
259 template<
class _E>
inline 260 MsgStream& operator<<( MsgStream& s, const std::_Fillobj<_E>& obj) {
268 template<
class _Tm>
inline 269 MsgStream& operator << (MsgStream& s, const std::_Smanip<_Tm>& manip) {
277 #elif defined (__GNUC__) 280 const std::_Setiosflags &manip) {
288 const std::_Resetiosflags &manip) {
296 const std::_Setbase &manip) {
304 const std::_Setprecision &manip) {
312 const std::_Setw &manip) {
319 #endif // not __APPLE__ 320 #else // GCC, version << 3 321 template<
class _Tm>
inline 323 MsgStream& operator << (MsgStream& s, const std::smanip<_Tm>& manip) {
330 #endif // WIN32 or (__GNUC__) 356 template <
typename T>
368 #if defined(__GNUC__) and not defined(__APPLE__) 371 MsgStream& operator << (MsgStream& lhs, const std::_Setfill<T> &manip) {
372 if ( lhs.isActive() )
381 #endif // GAUDIKERNEL_MSGSTREAM_H std::ostringstream & stream()
Access string MsgStream.
Definition of the MsgStream class used to transmit messages.
MsgStream & operator<<(longlong arg)
const std::string & buffer() const
Access string buffer.
MSG::Level currentLevel()
Retrieve current stream output level.
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
bool m_useColors
use colors
GAUDI_API void resetColor()
Reset the colors to defaults.
MSG::Level level()
Retrieve output level.
static bool m_countInactive
Flag to state if the inactive messages has to be counted.
MsgStream & dec(MsgStream &log)
bool isActive() const
Accessor: is MsgStream active.
IMessageSvc * m_service
Pointer to message service if buffer has send.
MsgStream & write(const char *buff, int len)
virtual void incrInactiveCount(MSG::Level level, const std::string &src)=0
Increment deactivated message count.
MsgStream & report(int lvl)
Initialize report of new message: activate if print level is sufficient.
MsgStream & hex(MsgStream &log)
virtual GAUDI_API MsgStream & doOutput()
Output method.
std::string m_source
Use std::string for source information to be passed to the message service.
Provide serialization function (output only) for some common STL classes (vectors, lists, pairs, maps) plus GaudiUtils::Map and GaudiUtils::HashMap.
MSG::Level m_level
Debug level of the message service.
GAUDI_API void setColor(MSG::Color col)
Set the text color.
std::ios_base::iostate STATE_TYPE
MsgStream & operator<<(MsgStream &(*_f)(MsgStream &))
Accept MsgStream modifiers.
MsgStream & operator<<(std::ios_base &(*_f)(std::ios_base &))
Accept ios base class modifiers.
long setf(FLAG_TYPE _f, FLAG_TYPE _m)
MsgStream & operator<<(std::ios &(*_f)(std::ios &))
Accept ios modifiers.
void clear(STATE_TYPE _i=std::ios_base::failbit)
void deactivate()
Deactivate MsgStream.
std::ostringstream m_stream
String MsgStream associated to buffer.
The IMessage is the interface implemented by the message service.
void setMsgSvc(IMessageSvc *svc)
Update IMessageSvc pointer.
bool m_active
Flag set to true if formatting engine is active.
std::string m_buffer
Use standard string for information buffering.
MSG::Level m_currLevel
Current debug level.
GAUDI_API MsgStream(IMessageSvc *svc, int buffer_length=128)
Standard constructor: Connect to message service for output.
long flags() const
IOS emulation.
Print levels enumeration.
Forward declarations for the functions in SerializeSTL.h.
void setLevel(int level)
Update outputlevel.
MsgStream & operator<<(std::ostream &(*_f)(std::ostream &))
Accept oMsgStream modifiers.
void activate()
Activate MsgStream.
MsgStream(const MsgStream &msg)
Copy constructor.
IInactiveMessageCounter * m_inactCounter
Pointer to service counting messages prepared but not printed because of wrong level.
std::ios_base::fmtflags FLAG_TYPE
Error return code in case ios modification is requested for inactive streams.
static GAUDI_API bool enableCountInactive(bool value=true)
Enable/disable the count of inactive messages.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
virtual GAUDI_API ~MsgStream()=default
Standard destructor.
static GAUDI_API bool countInactive()
Returns the state of the counting of inactive messages (enabled/disabled).
void unsetf(FLAG_TYPE _l)