MessageSvc Class Reference

#include <src/MessageSvc/MessageSvc.h>

Inheritance diagram for MessageSvc:
Collaboration diagram for MessageSvc:

Classes

struct  MsgAry
 Private helper class to keep the count of messages of a type (MSG::LEVEL). More...
 

Public Types

typedef std::pair< std::string, std::ostream * > NamedStream
 
typedef std::multimap< int, NamedStreamStreamMap
 
typedef std::multimap< StatusCode, MessageMessageMap
 
typedef std::map< std::string, int > ThresholdMap
 
- Public Types inherited from extends< Service, IMessageSvc, IInactiveMessageCounter >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces...>
 Typedef to the base of this class. More...
 
- Public Types inherited from Service
typedef Gaudi::PluginService::Factory< IService *, const std::string &, ISvcLocator * > Factory
 
- Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using base_class = CommonMessaging
 
- Public Types inherited from extend_interfaces< Interfaces...>
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type
 take union of the ext_iids of all Interfaces... More...
 

Public Member Functions

 MessageSvc (const std::string &name, ISvcLocator *svcloc)
 
 ~MessageSvc () override=default
 
StatusCode reinitialize () override
 Reinitialize Service. More...
 
StatusCode initialize () override
 Initialize Service. More...
 
StatusCode finalize () override
 Finalize Service. More...
 
void reportMessage (const Message &message) override
 
void reportMessage (const Message &msg, int outputLevel) override
 
void reportMessage (const StatusCode &code, const std::string &source="") override
 
void reportMessage (const char *source, int type, const char *message) override
 
void reportMessage (const std::string &source, int type, const std::string &message) override
 
void insertMessage (const StatusCode &code, const Message &message) override
 
void eraseMessage () override
 
void eraseMessage (const StatusCode &code) override
 
void eraseMessage (const StatusCode &code, const Message &message) override
 
void insertStream (int message_type, const std::string &name, std::ostream *stream) override
 
void eraseStream () override
 
void eraseStream (int message_type) override
 
void eraseStream (int message_type, std::ostream *stream) override
 
void eraseStream (std::ostream *stream) override
 
std::ostreamdefaultStream () const override
 
void setDefaultStream (std::ostream *stream) override
 
int outputLevel () const override
 
int outputLevel (const std::string &source) const override
 
void setOutputLevel (int new_level) override
 
void setOutputLevel (const std::string &source, int new_level) override
 
bool useColor () const override
 
std::string getLogColor (int logLevel) const override
 
int messageCount (MSG::Level logLevel) const override
 
void incrInactiveCount (MSG::Level level, const std::string &src) override
 
- Public Member Functions inherited from extends< Service, IMessageSvc, IInactiveMessageCounter >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
 ~extends () override=default
 Virtual destructor. More...
 
- Public Member Functions inherited from Service
const std::stringname () const override
 Retrieve name of the service. More...
 
StatusCode configure () override
 
StatusCode initialize () override
 
StatusCode start () override
 
StatusCode stop () override
 
StatusCode finalize () override
 
StatusCode terminate () override
 
Gaudi::StateMachine::State FSMState () const override
 
Gaudi::StateMachine::State targetFSMState () const override
 
StatusCode reinitialize () override
 
StatusCode restart () override
 
StatusCode sysInitialize () override
 Initialize Service. More...
 
StatusCode sysStart () override
 Initialize Service. More...
 
StatusCode sysStop () override
 Initialize Service. More...
 
StatusCode sysFinalize () override
 Finalize Service. More...
 
StatusCode sysReinitialize () override
 Re-initialize the Service. More...
 
StatusCode sysRestart () override
 Re-initialize the Service. More...
 
StatusCode setProperty (const Property &p) override
 
StatusCode setProperty (const std::string &s) override
 
StatusCode setProperty (const std::string &n, const std::string &v) override
 
StatusCode getProperty (Property *p) const override
 
const PropertygetProperty (const std::string &name) const override
 
StatusCode getProperty (const std::string &n, std::string &v) const override
 
const std::vector< Property * > & getProperties () const override
 
bool hasProperty (const std::string &name) const override
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
 Service (std::string name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const override
 Retrieve pointer to service locator. More...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job. More...
 
template<class T >
StatusCode service (const std::string &name, const T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 
template<typename IFace = IService>
SmartIF< IFace > service (const std::string &name, bool createIf=true) const
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
template<class T >
StatusCode declarePrivateTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
 Declare used Private tool. More...
 
template<class T >
StatusCode declarePublicTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
 Declare used Public tool. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from CommonMessagingBase
virtual ~CommonMessagingBase ()=default
 Virtual destructor. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream More...
 
MSG::Level outputLevel () const __attribute__((deprecated))
 Backward compatibility function for getting the output level. More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
- Public Member Functions inherited from extend_interfaces< Interfaces...>
 ~extend_interfaces () override=default
 Virtual destructor. More...
 

Protected Member Functions

virtual void i_reportMessage (const Message &msg, int outputLevel)
 Internal implementation of reportMessage(const Message&,int) without lock. More...
 
virtual void i_reportMessage (const StatusCode &code, const std::string &source)
 Internal implementation of reportMessage(const StatusCode&,const std::string&) without lock. More...
 
- Protected Member Functions inherited from Service
 ~Service () override
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Private Types

typedef std::map< std::string, MSG::ColorColorMap
 

Private Member Functions

std::string colTrans (std::string, int)
 
void initColors (Property &prop)
 
void setupColors (Property &prop)
 
void setupLimits (Property &prop)
 
void setupThreshold (Property &prop)
 
void setupInactCount (Property &prop)
 
void setupLogStreams ()
 
void tee (const std::string &sourceName, const std::string &logFileName, const std::set< std::string > &declaredOutFileNames)
 

Private Attributes

std::ostreamm_defaultStream
 Pointer to the output stream. More...
 
Message m_defaultMessage
 Default Message. More...
 
StreamMap m_streamMap
 Stream map. More...
 
MessageMap m_messageMap
 Message map. More...
 
ThresholdMap m_thresholdMap
 Output level threshold map. More...
 
std::string m_defaultFormat
 Default format for the messages. More...
 
std::string m_defaultTimeFormat
 Default format for timestamps in the messages. More...
 
StringArrayProperty m_thresholdProp [MSG::NUM_LEVELS]
 Properties controlling. More...
 
BooleanProperty m_color
 
BooleanProperty m_stats
 
UnsignedIntegerProperty m_statLevel
 
StringArrayProperty m_logColors [MSG::NUM_LEVELS]
 
IntegerProperty m_msgLimit [MSG::NUM_LEVELS]
 
std::string m_logColorCodes [MSG::NUM_LEVELS]
 
std::map< std::string, MsgArym_sourceMap
 
std::map< std::string, MsgArym_inactiveMap
 
BooleanProperty m_suppress
 
BooleanProperty m_inactCount
 
std::vector< std::stringm_tracedInactiveSources
 
ColorMap m_colMap
 
std::array< int, MSG::NUM_LEVELSm_msgCount
 
std::map< std::string, std::stringm_loggedStreamsName
 
std::map< std::string, std::shared_ptr< std::ostream > > m_loggedStreams
 
std::recursive_mutex m_reportMutex
 Mutex to synchronize multiple threads printing. More...
 
std::recursive_mutex m_messageMapMutex
 Mutex to synchronize multiple access to m_messageMap. More...
 
std::recursive_mutex m_thresholdMapMutex
 Mutex to synchronize multiple access to m_thresholdMap (. More...
 

Additional Inherited Members

- Protected Attributes inherited from Service
IntegerProperty m_outputLevel = MSG::NIL
 Service output level. More...
 
Gaudi::StateMachine::State m_state = Gaudi::StateMachine::OFFLINE
 Service state. More...
 
Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::OFFLINE
 Service state. More...
 

Detailed Description

Definition at line 30 of file MessageSvc.h.

Member Typedef Documentation

Definition at line 167 of file MessageSvc.h.

Definition at line 36 of file MessageSvc.h.

Definition at line 34 of file MessageSvc.h.

Definition at line 35 of file MessageSvc.h.

Definition at line 37 of file MessageSvc.h.

Constructor & Destructor Documentation

MessageSvc::MessageSvc ( const std::string name,
ISvcLocator svcloc 
)

Definition at line 58 of file MessageSvc.cpp.

59  : base_class( name, svcloc ) {
63  declareProperty( "showStats", m_stats = false );
64  declareProperty( "statLevel", m_statLevel = 0 );
65 
66  // Special properties to control output level of individual sources
74 
76 
77  declareProperty( "fatalColorCode", m_logColors[MSG::FATAL] );
78  declareProperty( "errorColorCode", m_logColors[MSG::ERROR] );
79  declareProperty( "warningColorCode", m_logColors[MSG::WARNING] );
80  declareProperty( "infoColorCode", m_logColors[MSG::INFO] );
81  declareProperty( "debugColorCode", m_logColors[MSG::DEBUG] );
82  declareProperty( "verboseColorCode", m_logColors[MSG::VERBOSE] );
83  declareProperty( "alwaysColorCode", m_logColors[MSG::ALWAYS] );
84 
85  const int defaultLimit = 500;
86  declareProperty( "fatalLimit", m_msgLimit[MSG::FATAL] = defaultLimit );
87  declareProperty( "errorLimit", m_msgLimit[MSG::ERROR] = defaultLimit );
88  declareProperty( "warningLimit", m_msgLimit[MSG::WARNING] = defaultLimit );
89  declareProperty( "infoLimit", m_msgLimit[MSG::INFO] = defaultLimit );
90  declareProperty( "debugLimit", m_msgLimit[MSG::DEBUG] = defaultLimit );
91  declareProperty( "verboseLimit", m_msgLimit[MSG::VERBOSE] = defaultLimit );
92  declareProperty( "alwaysLimit", m_msgLimit[MSG::ALWAYS] = 0 );
93 
94  declareProperty( "defaultLimit", m_msgLimit[MSG::NIL] = defaultLimit );
95 
96  declareProperty( "enableSuppression", m_suppress = false );
98  declareProperty( "tracedInactiveSources", m_tracedInactiveSources,
99  "for each message source specified, print a stack trace for"
100  "the unprotected and unseen messages" );
101 #ifndef NDEBUG
102  // initialize the MsgStream static flag.
104 #endif
105 
106  declareProperty( "loggedStreams",
108  "MessageStream sources we want to dump into a logfile" );
109 
110  for (int ic=0; ic<MSG::NUM_LEVELS; ++ic) {
114  }
115 
117 }
IntegerProperty m_msgLimit[MSG::NUM_LEVELS]
Definition: MessageSvc.h:150
std::ostream * m_defaultStream
Pointer to the output stream.
Definition: MessageSvc.h:138
std::array< int, MSG::NUM_LEVELS > m_msgCount
Definition: MessageSvc.h:170
virtual Property & declareUpdateHandler(std::function< void(Property &)> fun)
set new callback for update
Definition: Property.cpp:72
void setupLimits(Property &prop)
Definition: MessageSvc.cpp:245
void setupInactCount(Property &prop)
Definition: MessageSvc.cpp:309
T end(T...args)
UnsignedIntegerProperty m_statLevel
Definition: MessageSvc.h:148
static const std::string getDefaultTimeFormat()
Get the default time format string.
Definition: Message.cpp:226
static const std::string getDefaultFormat()
Get the default format string.
Definition: Message.cpp:187
StringArrayProperty m_thresholdProp[MSG::NUM_LEVELS]
Properties controlling.
Definition: MessageSvc.h:145
T begin(T...args)
std::string m_defaultFormat
Default format for the messages.
Definition: MessageSvc.h:143
void setupColors(Property &prop)
Definition: MessageSvc.cpp:195
void initColors(Property &prop)
Definition: MessageSvc.cpp:165
BooleanProperty m_color
Definition: MessageSvc.h:146
BooleanProperty m_inactCount
Definition: MessageSvc.h:163
T fill(T...args)
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:215
BooleanProperty m_stats
Definition: MessageSvc.h:147
std::map< std::string, std::string > m_loggedStreamsName
Definition: MessageSvc.h:172
std::vector< std::string > m_tracedInactiveSources
Definition: MessageSvc.h:164
BooleanProperty m_suppress
Definition: MessageSvc.h:163
void setupThreshold(Property &prop)
Definition: MessageSvc.cpp:272
static GAUDI_API bool enableCountInactive(bool value=true)
Enable/disable the count of inactive messages.
Definition: MsgStream.cpp:32
std::string m_defaultTimeFormat
Default format for timestamps in the messages.
Definition: MessageSvc.h:144
StringArrayProperty m_logColors[MSG::NUM_LEVELS]
Definition: MessageSvc.h:149
MessageSvc::~MessageSvc ( )
overridedefault

Member Function Documentation

std::string MessageSvc::colTrans ( std::string  col,
int  offset 
)
private

Definition at line 434 of file MessageSvc.cpp.

434  {
435  auto itr = m_colMap.find(col);
436  int icol = offset + ( (itr != m_colMap.end()) ? itr->second : 8 );
437  return std::to_string( icol );
438 }
ColorMap m_colMap
Definition: MessageSvc.h:168
T to_string(T...args)
T end(T...args)
T find(T...args)
std::ostream* MessageSvc::defaultStream ( ) const
inlineoverride

Definition at line 94 of file MessageSvc.h.

94  {
95  return m_defaultStream;
96  }
std::ostream * m_defaultStream
Pointer to the output stream.
Definition: MessageSvc.h:138
void MessageSvc::eraseMessage ( )
override

Definition at line 658 of file MessageSvc.cpp.

659 {
662 }
MessageMap m_messageMap
Message map.
Definition: MessageSvc.h:141
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
Definition: MessageSvc.h:190
def lock(file)
Definition: locker.py:16
T clear(T...args)
void MessageSvc::eraseMessage ( const StatusCode code)
override

Definition at line 671 of file MessageSvc.cpp.

672 {
674  m_messageMap.erase( key );
675 }
MessageMap m_messageMap
Message map.
Definition: MessageSvc.h:141
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
Definition: MessageSvc.h:190
T erase(T...args)
def lock(file)
Definition: locker.py:16
void MessageSvc::eraseMessage ( const StatusCode code,
const Message message 
)
override

Definition at line 684 of file MessageSvc.cpp.

685 {
687 
688  erase_if( m_messageMap, m_messageMap.equal_range(key),
689  [&](MessageMap::const_reference j) { return j.second==msg; } ) ;
690 }
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
MessageMap m_messageMap
Message map.
Definition: MessageSvc.h:141
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
Definition: MessageSvc.h:190
def lock(file)
Definition: locker.py:16
T equal_range(T...args)
void MessageSvc::eraseStream ( )
override

Definition at line 592 of file MessageSvc.cpp.

593 {
594  m_streamMap.clear();
595 }
StreamMap m_streamMap
Stream map.
Definition: MessageSvc.h:140
T clear(T...args)
void MessageSvc::eraseStream ( int  message_type)
override

Definition at line 604 of file MessageSvc.cpp.

605 {
606  m_streamMap.erase( message_type );
607 }
StreamMap m_streamMap
Stream map.
Definition: MessageSvc.h:140
T erase(T...args)
void MessageSvc::eraseStream ( int  message_type,
std::ostream stream 
)
override

Definition at line 616 of file MessageSvc.cpp.

616  {
617  if ( stream ) {
618  erase_if( m_streamMap, m_streamMap.equal_range(key),
619  [&](StreamMap::const_reference j)
620  { return j.second.second == stream; } );
621  }
622 }
StreamMap m_streamMap
Stream map.
Definition: MessageSvc.h:140
T equal_range(T...args)
void MessageSvc::eraseStream ( std::ostream stream)
override

Definition at line 631 of file MessageSvc.cpp.

631  {
632  if ( stream ) {
633  erase_if( m_streamMap, [&](StreamMap::const_reference j)
634  { return j.second.second == stream; } );
635  }
636 }
StreamMap m_streamMap
Stream map.
Definition: MessageSvc.h:140
StatusCode MessageSvc::finalize ( )
override

Finalize Service.

Definition at line 321 of file MessageSvc.cpp.

321  {
322 
323  m_suppress = false;
324 
325  {
327 
328  if (m_stats) {
329  os << "Summarizing all message counts" << std::endl;
330  } else {
331  os << "Listing sources of suppressed message: " << std::endl;
332  }
333 
334  os << "=====================================================" << std::endl;
335  os << " Message Source | Level | Count" << std::endl;
336  os << "-----------------------------+---------+-------------" << std::endl;
337 
338 
339  bool found(false);
340 
341  for (auto itr=m_sourceMap.begin(); itr!=m_sourceMap.end(); ++itr) {
342  for (unsigned int ic = 0; ic < MSG::NUM_LEVELS; ++ic) {
343  if ( (itr->second.msg[ic] >= m_msgLimit[ic] && m_msgLimit[ic] != 0 ) ||
344  (m_stats && itr->second.msg[ic] > 0 && ic >= m_statLevel.value()) ) {
345  os << " ";
346  os.width(28);
347  os.setf(std::ios_base::left,std::ios_base::adjustfield);
348  os << itr->first;
349  os << "|";
350 
351  os.width(8);
352  os.setf(std::ios_base::right,std::ios_base::adjustfield);
353  os << levelNames[ic];
354  os << " |";
355 
356  os.width(9);
357  os << itr->second.msg[ic];
358  os << std::endl;
359 
360  found = true;
361  }
362  }
363  }
364  os << "=====================================================" << std::endl;
365  if (found || m_stats) std::cout << os.str();
366  }
367 
368 #ifndef NDEBUG
369  if (m_inactCount.value()) {
370 
372  os << "Listing sources of Unprotected and Unseen messages\n";
373 
374  bool found(false);
375 
376  unsigned int ml(0);
377  for (const auto& itr : m_inactiveMap) {
378  for (unsigned int ic = 0; ic < MSG::NUM_LEVELS; ++ic) {
379  if (itr.second.msg[ic] != 0 && itr.first.length() > ml) {
380  ml = itr.first.length();
381  }
382  }
383  }
384 
385  for (unsigned int i=0; i<ml+25; ++i) os << "=";
386 
387  os << std::endl << " ";
388  os.width(ml+2);
389  os.setf(std::ios_base::left,std::ios_base::adjustfield);
390  os << "Message Source";
391  os.width(1);
392  os << "| Level | Count" << std::endl;
393 
394  for (unsigned int i=0; i<ml+3; ++i) os << "-";
395  os << "+---------+-----------" << std::endl;
396 
397 
398  for (auto itr=m_inactiveMap.begin(); itr!=m_inactiveMap.end(); ++itr) {
399  for (unsigned int ic = 0; ic < MSG::NUM_LEVELS; ++ic) {
400  if (itr->second.msg[ic] != 0) {
401  os << " ";
402  os.width(ml+2);
403  os.setf(std::ios_base::left,std::ios_base::adjustfield);
404  os << itr->first;
405 
406  os << "|";
407 
408  os.width(8);
409  os.setf(std::ios_base::right,std::ios_base::adjustfield);
410  os << levelNames[ic];
411 
412  os << " |";
413 
414  os.width(9);
415  os << itr->second.msg[ic];
416 
417  os << std::endl;
418 
419  found = true;
420  }
421  }
422  }
423  for (unsigned int i=0; i<ml+25; ++i) os << "=";
424  os << std::endl;
425 
426  if (found) std::cout << os.str();
427  }
428 #endif
429 
430  return StatusCode::SUCCESS;
431 }
IntegerProperty m_msgLimit[MSG::NUM_LEVELS]
Definition: MessageSvc.h:150
T setf(T...args)
T endl(T...args)
UnsignedIntegerProperty m_statLevel
Definition: MessageSvc.h:148
std::map< std::string, MsgAry > m_sourceMap
Definition: MessageSvc.h:162
T width(T...args)
const TYPE & value() const
explicit conversion
Definition: Property.h:341
std::map< std::string, MsgAry > m_inactiveMap
Definition: MessageSvc.h:162
BooleanProperty m_inactCount
Definition: MessageSvc.h:163
BooleanProperty m_stats
Definition: MessageSvc.h:147
list i
Definition: ana.py:128
BooleanProperty m_suppress
Definition: MessageSvc.h:163
std::string MessageSvc::getLogColor ( int  logLevel) const
override

Definition at line 727 of file MessageSvc.cpp.

727  {
728 // ---------------------------------------------------------------------------
729  return (logLevel < MSG::NUM_LEVELS) ? m_logColorCodes[logLevel] : "" ;
730 }
std::string m_logColorCodes[MSG::NUM_LEVELS]
Definition: MessageSvc.h:152
void MessageSvc::i_reportMessage ( const Message msg,
int  outputLevel 
)
protectedvirtual

Internal implementation of reportMessage(const Message&,int) without lock.

Definition at line 451 of file MessageSvc.cpp.

451  {
452  int key = msg.getType();
453 
454  ++m_msgCount[key];
455 
456  const Message *cmsg = &msg;
457 
458  // processing logged streams
459  if ( !m_loggedStreams.empty() ) {
460  auto iLog = m_loggedStreams.find( msg.getSource() );
461  if ( m_loggedStreams.end() != iLog ) {
462  (*iLog->second) << *cmsg << std::endl;
463  }
464  }
465 
466  if ( m_suppress.value() || m_stats.value() ) {
467 
468  // Increase the counter of 'key' type of messages for the source and
469  // get the new value.
470  const int nmsg = ++(m_sourceMap[msg.getSource()].msg[key]);
471 
472  if (m_suppress.value() && m_msgLimit[key] != 0 ) {
473  if (nmsg > m_msgLimit[key]) return;
474  if (nmsg == m_msgLimit[key]) {
475  std::string txt = levelNames[key] + " message limit ("
476  + std::to_string( m_msgLimit[key].value() )
477  + ") reached for " + msg.getSource() + ". Suppressing further output.";
478  cmsg = new Message(msg.getSource(), MSG::WARNING, std::move(txt));
479  cmsg->setFormat(msg.getFormat());
480  }
481  }
482  }
483 
484  auto range = m_streamMap.equal_range( key );
485  if ( range.first != m_streamMap.end() ) {
486  std::for_each( range.first,range.second, [&](StreamMap::const_reference sm) {
487  *sm.second.second << *cmsg << std::endl;
488  });
489  } else if ( key >= outputLevel ) {
492  if (!m_color) {
493  (*m_defaultStream) << *cmsg << std::endl << std::flush;
494  } else {
495  (*m_defaultStream) << m_logColorCodes[key] << *cmsg << "\033[m"
496  << std::endl << std::flush;
497  }
498  }
499 
500  if (cmsg != &msg) { delete cmsg; }
501 
502 }
IntegerProperty m_msgLimit[MSG::NUM_LEVELS]
Definition: MessageSvc.h:150
const std::string & getFormat() const
Get the format string.
Definition: Message.cpp:176
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
T empty(T...args)
StreamMap m_streamMap
Stream map.
Definition: MessageSvc.h:140
std::array< int, MSG::NUM_LEVELS > m_msgCount
Definition: MessageSvc.h:170
T to_string(T...args)
T endl(T...args)
T end(T...args)
int getType() const
Get the message type.
Definition: Message.cpp:93
STL class.
std::map< std::string, std::shared_ptr< std::ostream > > m_loggedStreams
Definition: MessageSvc.h:173
std::map< std::string, MsgAry > m_sourceMap
Definition: MessageSvc.h:162
NamedRange_< CONTAINER > range(const CONTAINER &cnt, std::string name)
simple function to create the named range form arbitrary container
Definition: NamedRange.h:130
T move(T...args)
const TYPE & value() const
explicit conversion
Definition: Property.h:341
T flush(T...args)
T find(T...args)
void setFormat(std::string msg) const
Set the format string.
Definition: Message.cpp:200
The Message class.
Definition: Message.h:14
std::string m_defaultFormat
Default format for the messages.
Definition: MessageSvc.h:143
void setTimeFormat(std::string timeFormat) const
Set the time format string.
Definition: Message.cpp:239
std::string m_logColorCodes[MSG::NUM_LEVELS]
Definition: MessageSvc.h:152
const std::string & getSource() const
Get the message source.
Definition: Message.cpp:115
BooleanProperty m_color
Definition: MessageSvc.h:146
int outputLevel() const override
Definition: MessageSvc.cpp:693
BooleanProperty m_stats
Definition: MessageSvc.h:147
T for_each(T...args)
BooleanProperty m_suppress
Definition: MessageSvc.h:163
std::string m_defaultTimeFormat
Default format for timestamps in the messages.
Definition: MessageSvc.h:144
T equal_range(T...args)
void MessageSvc::i_reportMessage ( const StatusCode code,
const std::string source 
)
protectedvirtual

Internal implementation of reportMessage(const StatusCode&,const std::string&) without lock.

Definition at line 551 of file MessageSvc.cpp.

553 {
554  int level = outputLevel(source);
555  auto report = [&](Message mesg) {
556  mesg.setSource( source );
557  Message stat_code( source, mesg.getType(), "Status Code " + std::to_string( code.getCode() ) );
558  i_reportMessage( std::move(stat_code), level );
559  i_reportMessage( std::move(mesg), level );
560  };
561 
562  auto range = m_messageMap.equal_range( code );
563  if ( range.first != m_messageMap.end() ) {
564  std::for_each( range.first, range.second,
565  [&](MessageMap::const_reference sm) { report(sm.second); } );
566  } else {
567  report(m_defaultMessage);
568  }
569 }
unsigned long getCode() const
Get the status code by value.
Definition: StatusCode.h:93
virtual void i_reportMessage(const Message &msg, int outputLevel)
Internal implementation of reportMessage(const Message&,int) without lock.
Definition: MessageSvc.cpp:451
Message m_defaultMessage
Default Message.
Definition: MessageSvc.h:139
T to_string(T...args)
MessageMap m_messageMap
Message map.
Definition: MessageSvc.h:141
T end(T...args)
NamedRange_< CONTAINER > range(const CONTAINER &cnt, std::string name)
simple function to create the named range form arbitrary container
Definition: NamedRange.h:130
T move(T...args)
The Message class.
Definition: Message.h:14
int outputLevel() const override
Definition: MessageSvc.cpp:693
T for_each(T...args)
T equal_range(T...args)
void MessageSvc::incrInactiveCount ( MSG::Level  level,
const std::string src 
)
override

Definition at line 741 of file MessageSvc.cpp.

741  {
742  ++(m_inactiveMap[source].msg[level]);
743 
746  source) != end(m_tracedInactiveSources)) {
747  std::cout << "== inactive message detected from "
748  << source << " ==" << std::endl;
749  std::string t;
750  System::backTrace(t, 25, 0);
751  std::cout << t << std::endl;
752  }
753 }
T endl(T...args)
GAUDI_API int backTrace(void **addresses, const int depth)
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:45
STL class.
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:47
T find(T...args)
std::map< std::string, MsgAry > m_inactiveMap
Definition: MessageSvc.h:162
std::vector< std::string > m_tracedInactiveSources
Definition: MessageSvc.h:164
void MessageSvc::initColors ( Property prop)
private

Definition at line 165 of file MessageSvc.cpp.

165  {
166 
167  if (m_color) {
169  { { MSG::FATAL, { { "[94;101;1m" } } },
170  { MSG::ERROR, { { "[97;101;1m" } } },
171  { MSG::WARNING, { { "[93;1m" } } } } };
172 
173  for (const auto& p : tbl ) {
174  auto &lC = m_logColors[p.first];
175  if (lC.value().empty()) {
176  lC.set(p.second);
177  } else {
179  }
180  }
181 
182  } else {
183 
184  // reset all color codes;
185  for (int ic=0; ic<MSG::NUM_LEVELS; ++ic) {
186  m_logColors[ic].set( { } );
187  }
188 
189  }
190 
191 }
bool set(const TYPE &value)
update the value of the property/check the verifier
Definition: Property.h:434
void setupColors(Property &prop)
Definition: MessageSvc.cpp:195
STL class.
BooleanProperty m_color
Definition: MessageSvc.h:146
StringArrayProperty m_logColors[MSG::NUM_LEVELS]
Definition: MessageSvc.h:149
StatusCode MessageSvc::initialize ( )
override

Initialize Service.

Definition at line 123 of file MessageSvc.cpp.

123  {
124  StatusCode sc;
125  sc = Service::initialize();
126  if( sc.isFailure() ) return sc;
127  // Set my own properties
128  sc = setProperties();
129  if (sc.isFailure()) return sc;
130 
131 #ifdef _WIN32
132  m_color = false;
133 #endif
134 
135  //NOTE: m_colMap is used _before_ it is filled here,
136  // i.e. while it is still empty.
137  // Moving this initialization 'up' by eg. just
138  // having a 'static const' colMap does not leave
139  // the results invariant...
140  m_colMap["black"] = MSG::BLACK;
141  m_colMap["red"] = MSG::RED;
142  m_colMap["green"] = MSG::GREEN;
143  m_colMap["yellow"] = MSG::YELLOW;
144  m_colMap["blue"] = MSG::BLUE;
145  m_colMap["purple"] = MSG::PURPLE;
146  m_colMap["cyan"] = MSG::CYAN;
147  m_colMap["white"] = MSG::WHITE;
148 
149  // make sure the map of logged stream names is initialized
150  setupLogStreams();
151 
152  return StatusCode::SUCCESS;
153 }
StatusCode initialize() override
Definition: Service.cpp:68
ColorMap m_colMap
Definition: MessageSvc.h:168
void setupLogStreams()
Definition: MessageSvc.cpp:756
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
StatusCode setProperties()
Method for setting declared properties to the values specified for the job.
Definition: Service.cpp:363
BooleanProperty m_color
Definition: MessageSvc.h:146
void MessageSvc::insertMessage ( const StatusCode code,
const Message message 
)
override

Definition at line 645 of file MessageSvc.cpp.

646 {
648  m_messageMap.emplace( key, msg );
649 }
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
MessageMap m_messageMap
Message map.
Definition: MessageSvc.h:141
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
Definition: MessageSvc.h:190
def lock(file)
Definition: locker.py:16
T emplace(T...args)
void MessageSvc::insertStream ( int  message_type,
const std::string name,
std::ostream stream 
)
override

Definition at line 578 of file MessageSvc.cpp.

581 {
582  m_streamMap.emplace( key, NamedStream(name,stream) );
583 }
StreamMap m_streamMap
Stream map.
Definition: MessageSvc.h:140
std::pair< std::string, std::ostream * > NamedStream
Definition: MessageSvc.h:34
T emplace(T...args)
int MessageSvc::messageCount ( MSG::Level  logLevel) const
override

Definition at line 733 of file MessageSvc.cpp.

733  {
734 
735  return m_msgCount[level];
736 
737 }
std::array< int, MSG::NUM_LEVELS > m_msgCount
Definition: MessageSvc.h:170
int MessageSvc::outputLevel ( ) const
override

Definition at line 693 of file MessageSvc.cpp.

693  {
694 // ---------------------------------------------------------------------------
695  return m_outputLevel;
696 }
IntegerProperty m_outputLevel
Service output level.
Definition: Service.h:309
int MessageSvc::outputLevel ( const std::string source) const
override

Definition at line 699 of file MessageSvc.cpp.

699  {
700 // ---------------------------------------------------------------------------
702  auto it = m_thresholdMap.find( source );
703  return it != m_thresholdMap.end() ? it->second : m_outputLevel.value();
704 }
IntegerProperty m_outputLevel
Service output level.
Definition: Service.h:309
T end(T...args)
ThresholdMap m_thresholdMap
Output level threshold map.
Definition: MessageSvc.h:142
def lock(file)
Definition: locker.py:16
const TYPE & value() const
explicit conversion
Definition: Property.h:341
T find(T...args)
std::recursive_mutex m_thresholdMapMutex
Mutex to synchronize multiple access to m_thresholdMap (.
Definition: MessageSvc.h:194
StatusCode MessageSvc::reinitialize ( )
override

Reinitialize Service.

Definition at line 158 of file MessageSvc.cpp.

158  {
160  return initialize();
161 }
Gaudi::StateMachine::State m_state
Service state.
Definition: Service.h:311
StatusCode initialize() override
Initialize Service.
Definition: MessageSvc.cpp:123
void MessageSvc::reportMessage ( const Message message)
override

Definition at line 510 of file MessageSvc.cpp.

510  {
511  reportMessage(msg, outputLevel(msg.getSource()));
512 }
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
void reportMessage(const Message &message) override
Definition: MessageSvc.cpp:510
int outputLevel() const override
Definition: MessageSvc.cpp:693
void MessageSvc::reportMessage ( const Message msg,
int  outputLevel 
)
override

Definition at line 446 of file MessageSvc.cpp.

446  {
449 }
virtual void i_reportMessage(const Message &msg, int outputLevel)
Internal implementation of reportMessage(const Message&,int) without lock.
Definition: MessageSvc.cpp:451
def lock(file)
Definition: locker.py:16
std::recursive_mutex m_reportMutex
Mutex to synchronize multiple threads printing.
Definition: MessageSvc.h:187
int outputLevel() const override
Definition: MessageSvc.cpp:693
void MessageSvc::reportMessage ( const StatusCode code,
const std::string source = "" 
)
override

Definition at line 544 of file MessageSvc.cpp.

546 {
548  i_reportMessage(code, source);
549 }
virtual void i_reportMessage(const Message &msg, int outputLevel)
Internal implementation of reportMessage(const Message&,int) without lock.
Definition: MessageSvc.cpp:451
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
Definition: MessageSvc.h:190
def lock(file)
Definition: locker.py:16
void MessageSvc::reportMessage ( const char *  source,
int  type,
const char *  message 
)
override

Definition at line 520 of file MessageSvc.cpp.

522  {
523  reportMessage( Message{ source, type, message } );
524 }
string type
Definition: gaudirun.py:151
void reportMessage(const Message &message) override
Definition: MessageSvc.cpp:510
The Message class.
Definition: Message.h:14
void MessageSvc::reportMessage ( const std::string source,
int  type,
const std::string message 
)
override

Definition at line 532 of file MessageSvc.cpp.

534  {
535  reportMessage( Message{source, type, message} );
536 }
string type
Definition: gaudirun.py:151
void reportMessage(const Message &message) override
Definition: MessageSvc.cpp:510
The Message class.
Definition: Message.h:14
void MessageSvc::setDefaultStream ( std::ostream stream)
inlineoverride

Definition at line 99 of file MessageSvc.h.

99  {
101  m_defaultStream = stream;
102  }
std::ostream * m_defaultStream
Pointer to the output stream.
Definition: MessageSvc.h:138
def lock(file)
Definition: locker.py:16
std::recursive_mutex m_reportMutex
Mutex to synchronize multiple threads printing.
Definition: MessageSvc.h:187
void MessageSvc::setOutputLevel ( int  new_level)
override

Definition at line 707 of file MessageSvc.cpp.

707  {
708 // ---------------------------------------------------------------------------
709  m_outputLevel = new_level;
710 }
IntegerProperty m_outputLevel
Service output level.
Definition: Service.h:309
void MessageSvc::setOutputLevel ( const std::string source,
int  new_level 
)
override

Definition at line 713 of file MessageSvc.cpp.

713  {
714 // ---------------------------------------------------------------------------
716 
717  // only write if we really have to...
718  auto i = m_thresholdMap.find( source );
719  if (i == m_thresholdMap.end()) {
720  m_thresholdMap[source] = level;
721  } else if (i->second!=level) {
722  i->second = level;
723  }
724 }
T end(T...args)
ThresholdMap m_thresholdMap
Output level threshold map.
Definition: MessageSvc.h:142
def lock(file)
Definition: locker.py:16
T find(T...args)
list i
Definition: ana.py:128
std::recursive_mutex m_thresholdMapMutex
Mutex to synchronize multiple access to m_thresholdMap (.
Definition: MessageSvc.h:194
void MessageSvc::setupColors ( Property prop)
private

Definition at line 195 of file MessageSvc.cpp.

195  {
196 
197  if (! m_color) return;
198 
200  { {"fatalColorCode", MSG::FATAL },
201  {"errorColorCode", MSG::ERROR },
202  {"warningColorCode", MSG::WARNING },
203  {"infoColorCode", MSG::INFO },
204  {"debugColorCode", MSG::DEBUG },
205  {"verboseColorCode", MSG::VERBOSE },
206  {"alwaysColorCode", MSG::ALWAYS } } };
207 
208  auto i = std::find_if( std::begin(tbl),std::end(tbl),
209  [&](const std::pair<const char*,MSG::Level>& t) {
210  return prop.name() == t.first;
211  } );
212  if (i==std::end(tbl)) {
213  std::cout << "ERROR: Unknown message color parameter: " << prop.name()
214  << std::endl;
215  return;
216  }
217  int ic = i->second;
218 
219  std::string code;
220  auto itr = m_logColors[ic].value().begin();
221 
222  if ( m_logColors[ic].value().size() == 1 ) {
223 
224  if (itr->empty()) {
225  code = "";
226  } else if (itr->compare(0,1,"[") == 0) {
227  code = "\033" + *itr;
228  } else {
229  code = "\033[" + colTrans(*itr, 90) + ";1m";
230  }
231 
232  } else if (m_logColors[ic].value().size() == 2) {
233  auto itr2 = itr + 1;
234 
235  code = "\033[" + colTrans(*itr, 90) + ";"
236  + colTrans(*itr2, 100) + ";1m";
237 
238  }
239 
240  m_logColorCodes[ic] = code;
241 
242 }
std::string colTrans(std::string, int)
Definition: MessageSvc.cpp:434
const std::string & name() const
property name
Definition: Property.h:45
T endl(T...args)
T end(T...args)
STL class.
const TYPE & value() const
explicit conversion
Definition: Property.h:341
T find_if(T...args)
T begin(T...args)
STL class.
std::string m_logColorCodes[MSG::NUM_LEVELS]
Definition: MessageSvc.h:152
BooleanProperty m_color
Definition: MessageSvc.h:146
list i
Definition: ana.py:128
StringArrayProperty m_logColors[MSG::NUM_LEVELS]
Definition: MessageSvc.h:149
void MessageSvc::setupInactCount ( Property prop)
private

Definition at line 309 of file MessageSvc.cpp.

309  {
310  if (prop.name() == "countInactive") {
311  BooleanProperty *p = dynamic_cast<BooleanProperty*>(&prop);
312  if (p)
314  }
315 }
const std::string & name() const
property name
Definition: Property.h:45
const TYPE & value() const
explicit conversion
Definition: Property.h:341
static GAUDI_API bool enableCountInactive(bool value=true)
Enable/disable the count of inactive messages.
Definition: MsgStream.cpp:32
void MessageSvc::setupLimits ( Property prop)
private

Definition at line 245 of file MessageSvc.cpp.

245  {
246  // Just report problems in the settings of the limits and unknown limit parameters
247  if (prop.name() == "alwaysLimit") {
248  IntegerProperty *p = dynamic_cast<IntegerProperty*>(&prop);
249  if (p && p->value() != 0) {
250  std::cout << "MessageSvc ERROR: cannot suppress ALWAYS messages" << std::endl;
251  p->setValue(0);
252  }
253  } else if (prop.name() == "defaultLimit") {
254  for (int i = MSG::VERBOSE; i< MSG::NUM_LEVELS; ++i) {
255  if (i != MSG::ALWAYS) {
257  }
258  }
259  } else if (prop.name() != "fatalLimit" &&
260  prop.name() != "errorLimit" &&
261  prop.name() != "warningLimit" &&
262  prop.name() == "infoLimit" &&
263  prop.name() == "debugLimit" &&
264  prop.name() == "verboseLimit") {
265  std::cout << "MessageSvc ERROR: Unknown message limit parameter: "
266  << prop.name() << std::endl;
267  return;
268  }
269 }
IntegerProperty m_msgLimit[MSG::NUM_LEVELS]
Definition: MessageSvc.h:150
const std::string & name() const
property name
Definition: Property.h:45
T endl(T...args)
bool setValue(const TYPE &value) override
implementation of PropertyWithValue::setValue
Definition: Property.h:406
const TYPE & value() const
explicit conversion
Definition: Property.h:341
list i
Definition: ana.py:128
void MessageSvc::setupLogStreams ( )
private

Definition at line 756 of file MessageSvc.cpp.

757 {
758  // reset state
760 
761  for ( auto& iProp : m_loggedStreamsName ) {
762 
763  std::set<std::string> outFileNames;
764  for ( auto& jProp : m_loggedStreamsName ) {
765  if ( jProp.first != iProp.first ) {
766  outFileNames.insert( jProp.second );
767  }
768  }
769  tee( iProp.first, iProp.second, outFileNames );
770 
771  }//> loop over property entries
772 }
std::map< std::string, std::shared_ptr< std::ostream > > m_loggedStreams
Definition: MessageSvc.h:173
T clear(T...args)
T insert(T...args)
void tee(const std::string &sourceName, const std::string &logFileName, const std::set< std::string > &declaredOutFileNames)
Definition: MessageSvc.cpp:775
std::map< std::string, std::string > m_loggedStreamsName
Definition: MessageSvc.h:172
void MessageSvc::setupThreshold ( Property prop)
private

Definition at line 272 of file MessageSvc.cpp.

272  {
273 
275  { { "setFatal", MSG::FATAL },
276  { "setError", MSG::ERROR },
277  { "setWarning", MSG::WARNING },
278  { "setInfo", MSG::INFO },
279  { "setDebug", MSG::DEBUG },
280  { "setVerbose", MSG::VERBOSE },
281  { "setAlways", MSG::ALWAYS } } };
282 
283  auto i = std::find_if( std::begin(tbl),std::end(tbl),
284  [&](const std::pair<const char*,MSG::Level>& t) {
285  return prop.name() == t.first;
286  } );
287  if (i==std::end(tbl)) {
288  std::cerr << "MessageSvc ERROR: Unknown message threshold parameter: "
289  << prop.name() << std::endl;
290  return;
291  }
292  int ic = i->second;
293 
294  StringArrayProperty *sap = dynamic_cast<StringArrayProperty*>( &prop);
295  if (!sap) {
296  std::cerr << "could not dcast " << prop.name()
297  << " to a StringArrayProperty (which it should be!)" << std::endl;
298  } else {
299  for ( auto& i : sap->value() ) setOutputLevel( i, ic );
300  }
301 
302 }
const std::string & name() const
property name
Definition: Property.h:45
T endl(T...args)
T end(T...args)
void setOutputLevel(int new_level) override
Definition: MessageSvc.cpp:707
const TYPE & value() const
explicit conversion
Definition: Property.h:341
T find_if(T...args)
T begin(T...args)
STL class.
list i
Definition: ana.py:128
void MessageSvc::tee ( const std::string sourceName,
const std::string logFileName,
const std::set< std::string > &  declaredOutFileNames 
)
private

Definition at line 775 of file MessageSvc.cpp.

778 {
779  const std::ios_base::openmode openMode = std::ios_base::out |
780  std::ios_base::trunc;
781 
782  auto iStream = m_loggedStreams.find( sourceName );
783  if ( iStream != std::end(m_loggedStreams) ) {
784  m_loggedStreams.erase( iStream );
785  }
786 
787  // before creating a new ofstream, make sure there is no already existing
788  // one with the same file name...
789  for (auto& iStream : m_loggedStreams ) {
790  if ( outFileNames.find( outFileName ) != outFileNames.end() ) {
791  m_loggedStreams[sourceName] = m_loggedStreams[iStream.first];
792  return;
793  }
794  }
795 
796  auto out = std::make_shared<std::ofstream>( outFileName, openMode );
797  if ( out->good() ) m_loggedStreams[sourceName] = std::move(out);
798 
799 }
T end(T...args)
std::map< std::string, std::shared_ptr< std::ostream > > m_loggedStreams
Definition: MessageSvc.h:173
T erase(T...args)
T move(T...args)
T find(T...args)
bool MessageSvc::useColor ( ) const
inlineoverride

Definition at line 117 of file MessageSvc.h.

117 { return m_color; }
BooleanProperty m_color
Definition: MessageSvc.h:146

Member Data Documentation

ColorMap MessageSvc::m_colMap
private

Definition at line 168 of file MessageSvc.h.

BooleanProperty MessageSvc::m_color
private

Definition at line 146 of file MessageSvc.h.

std::string MessageSvc::m_defaultFormat
private

Default format for the messages.

Definition at line 143 of file MessageSvc.h.

Message MessageSvc::m_defaultMessage
private

Default Message.

Definition at line 139 of file MessageSvc.h.

std::ostream* MessageSvc::m_defaultStream
private

Pointer to the output stream.

Definition at line 138 of file MessageSvc.h.

std::string MessageSvc::m_defaultTimeFormat
private

Default format for timestamps in the messages.

Definition at line 144 of file MessageSvc.h.

BooleanProperty MessageSvc::m_inactCount
private

Definition at line 163 of file MessageSvc.h.

std::map<std::string,MsgAry> MessageSvc::m_inactiveMap
private

Definition at line 162 of file MessageSvc.h.

std::string MessageSvc::m_logColorCodes[MSG::NUM_LEVELS]
private

Definition at line 152 of file MessageSvc.h.

StringArrayProperty MessageSvc::m_logColors[MSG::NUM_LEVELS]
private

Definition at line 149 of file MessageSvc.h.

std::map<std::string, std::shared_ptr<std::ostream> > MessageSvc::m_loggedStreams
private

Definition at line 173 of file MessageSvc.h.

std::map<std::string, std::string> MessageSvc::m_loggedStreamsName
private

Definition at line 172 of file MessageSvc.h.

MessageMap MessageSvc::m_messageMap
private

Message map.

Definition at line 141 of file MessageSvc.h.

std::recursive_mutex MessageSvc::m_messageMapMutex
mutableprivate

Mutex to synchronize multiple access to m_messageMap.

Definition at line 190 of file MessageSvc.h.

std::array<int,MSG::NUM_LEVELS> MessageSvc::m_msgCount
private

Definition at line 170 of file MessageSvc.h.

IntegerProperty MessageSvc::m_msgLimit[MSG::NUM_LEVELS]
private

Definition at line 150 of file MessageSvc.h.

std::recursive_mutex MessageSvc::m_reportMutex
mutableprivate

Mutex to synchronize multiple threads printing.

Definition at line 187 of file MessageSvc.h.

std::map<std::string,MsgAry> MessageSvc::m_sourceMap
private

Definition at line 162 of file MessageSvc.h.

UnsignedIntegerProperty MessageSvc::m_statLevel
private

Definition at line 148 of file MessageSvc.h.

BooleanProperty MessageSvc::m_stats
private

Definition at line 147 of file MessageSvc.h.

StreamMap MessageSvc::m_streamMap
private

Stream map.

Definition at line 140 of file MessageSvc.h.

BooleanProperty MessageSvc::m_suppress
private

Definition at line 163 of file MessageSvc.h.

ThresholdMap MessageSvc::m_thresholdMap
private

Output level threshold map.

Definition at line 142 of file MessageSvc.h.

std::recursive_mutex MessageSvc::m_thresholdMapMutex
mutableprivate

Mutex to synchronize multiple access to m_thresholdMap (.

See also
MsgStream::doOutput).

Definition at line 194 of file MessageSvc.h.

StringArrayProperty MessageSvc::m_thresholdProp[MSG::NUM_LEVELS]
private

Properties controlling.

Definition at line 145 of file MessageSvc.h.

std::vector<std::string> MessageSvc::m_tracedInactiveSources
private

Definition at line 164 of file MessageSvc.h.


The documentation for this class was generated from the following files: