The Gaudi Framework  v31r0 (aeb156f0)
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
using Factory = Gaudi::PluginService::Factory< IService *(const std::string &, ISvcLocator *)>
 
- Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 Typedef used to refer to this class from derived classes, as in. More...
 
- 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)
 
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...
 
- 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...
 
 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 >
StatusCode declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
 Declare used 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 PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 PropertyHolder ()=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
 Helper to wrap a regular data member and use it as a regular property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
 Declare a PropertyBase instance setting name and documentation. More...
 
Gaudi::Details::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p) override
 set the property form another property More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const std::string &n, const std::string &v) override
 set the property from name and the value More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (const std::string &name) const override
 get the property by name More...
 
StatusCode getProperty (const std::string &n, std::string &v) const override
 convert the property to the string More...
 
const std::vector< Gaudi::Details::PropertyBase * > & getProperties () const override
 get all properties More...
 
bool hasProperty (const std::string &name) const override
 Return true if we have a property with the given name. More...
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
- Public Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
MSG::Level outputLevel () const
 Backward compatibility function for getting the output level. More...
 
- Public Member Functions inherited from CommonMessagingBase
virtual ~CommonMessagingBase ()=default
 Virtual destructor. More...
 
const 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...
 

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 PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBaseproperty (const std::string &name) const
 
- Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level setUpMessaging () const
 Set up local caches. More...
 
MSG::Level resetMessaging ()
 Reinitialize internal states. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Private Member Functions

void setupColors (Gaudi::Details::PropertyBase &prop)
 
void setupLimits (Gaudi::Details::PropertyBase &prop)
 
void setupThreshold (Gaudi::Details::PropertyBase &prop)
 
void setupInactCount (Gaudi::Details::PropertyBase &prop)
 
void setupLogStreams ()
 
void tee (const std::string &sourceName, const std::string &logFileName, const std::set< std::string > &declaredOutFileNames)
 

Private Attributes

Gaudi::Property< std::stringm_defaultFormat {this, "Format", Message::getDefaultFormat(), ""}
 
Gaudi::Property< std::stringm_defaultTimeFormat {this, "timeFormat", Message::getDefaultTimeFormat(), ""}
 
Gaudi::Property< bool > m_stats {this, "showStats", false, ""}
 
Gaudi::Property< unsigned int > m_statLevel {this, "statLevel", 0, ""}
 
std::array< Gaudi::Property< std::vector< std::string > >, MSG::NUM_LEVELSm_thresholdProp
 
Gaudi::Property< bool > m_color {this, "useColors", false, ""}
 
std::array< Gaudi::Property< std::vector< std::string > >, MSG::NUM_LEVELSm_logColors
 
std::array< Gaudi::Property< int >, MSG::NUM_LEVELSm_msgLimit
 
Gaudi::Property< bool > m_suppress {this, "enableSuppression", false, ""}
 
Gaudi::Property< bool > m_inactCount {this, "countInactive", false, &MessageSvc::setupInactCount, ""}
 
Gaudi::Property< std::vector< std::string > > m_tracedInactiveSources
 
Gaudi::Property< std::map< std::string, std::string > > m_loggedStreamsName
 
std::ostreamm_defaultStream = &std::cout
 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_logColorCodes [MSG::NUM_LEVELS]
 
std::map< std::string, MsgArym_sourceMap
 
std::map< std::string, MsgArym_inactiveMap
 
std::array< int, MSG::NUM_LEVELSm_msgCount
 
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
Gaudi::StateMachine::State m_state = Gaudi::StateMachine::OFFLINE
 Service state. More...
 
Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::OFFLINE
 Service state. More...
 
Gaudi::Property< int > m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
 
Gaudi::Property< bool > m_auditInit {this, "AuditServices", false, "[[deprecated]] unused"}
 
Gaudi::Property< bool > m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
 
Gaudi::Property< bool > m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
 
Gaudi::Property< bool > m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
 
Gaudi::Property< bool > m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
 
Gaudi::Property< bool > m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
 
Gaudi::Property< bool > m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
 
SmartIF< IAuditorSvcm_pAuditorSvc
 Auditor Service. More...
 

Detailed Description

Definition at line 30 of file MessageSvc.h.

Member Typedef Documentation

Definition at line 34 of file MessageSvc.h.

Definition at line 32 of file MessageSvc.h.

Definition at line 33 of file MessageSvc.h.

Definition at line 35 of file MessageSvc.h.

Constructor & Destructor Documentation

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

Definition at line 78 of file MessageSvc.cpp.

78  : base_class( name, svcloc ) {
79 
80  m_outputLevel.declareUpdateHandler( [svcloc]( Gaudi::Details::PropertyBase& ) {
81  SmartIF<IAppMgrUI> app = svcloc;
82  if ( app ) app->outputLevelUpdate();
83  } );
84 
85 #ifndef NDEBUG
86  // initialize the MsgStream static flag.
88 #endif
89 
90  for ( int ic = 0; ic < MSG::NUM_LEVELS; ++ic ) {
91  m_logColors[ic].declareUpdateHandler( &MessageSvc::setupColors, this );
92  m_msgLimit[ic].declareUpdateHandler( &MessageSvc::setupLimits, this );
93  m_thresholdProp[ic].declareUpdateHandler( &MessageSvc::setupThreshold, this );
94  }
95 
96  m_logColors[MSG::FATAL].set( {"blue", "red"} );
97  m_logColors[MSG::ERROR].set( {"white", "red"} );
98  m_logColors[MSG::WARNING].set( {"yellow"} );
99 
101 }
Gaudi::Property< int > m_outputLevel
Definition: Service.h:176
T end(T...args)
void setupColors(Gaudi::Details::PropertyBase &prop)
Definition: MessageSvc.cpp:130
virtual void outputLevelUpdate()=0
Function to call to update the outputLevel of the components (after a change in MessageSvc).
Gaudi::Property< bool > m_inactCount
Definition: MessageSvc.h:165
std::array< Gaudi::Property< std::vector< std::string > >, MSG::NUM_LEVELS > m_logColors
Definition: MessageSvc.h:146
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
T begin(T...args)
void setupLimits(Gaudi::Details::PropertyBase &prop)
Definition: MessageSvc.cpp:172
void setupThreshold(Gaudi::Details::PropertyBase &prop)
Definition: MessageSvc.cpp:192
std::array< int, MSG::NUM_LEVELS > m_msgCount
Definition: MessageSvc.h:194
std::array< Gaudi::Property< std::vector< std::string > >, MSG::NUM_LEVELS > m_thresholdProp
Definition: MessageSvc.h:135
T fill(T...args)
std::array< Gaudi::Property< int >, MSG::NUM_LEVELS > m_msgLimit
Definition: MessageSvc.h:155
static GAUDI_API bool enableCountInactive(bool value=true)
Enable/disable the count of inactive messages.
Definition: MsgStream.cpp:31

Member Function Documentation

std::ostream* MessageSvc::defaultStream ( ) const
inlineoverride

Definition at line 90 of file MessageSvc.h.

90 { return m_defaultStream; }
std::ostream * m_defaultStream
Pointer to the output stream.
Definition: MessageSvc.h:176
void MessageSvc::eraseMessage ( )
override

Definition at line 531 of file MessageSvc.cpp.

531  {
534 }
MessageMap m_messageMap
Message map.
Definition: MessageSvc.h:179
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
Definition: MessageSvc.h:212
T lock(T...args)
T clear(T...args)
void MessageSvc::eraseMessage ( const StatusCode code)
override

Definition at line 543 of file MessageSvc.cpp.

543  {
545  m_messageMap.erase( key );
546 }
MessageMap m_messageMap
Message map.
Definition: MessageSvc.h:179
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
Definition: MessageSvc.h:212
T erase(T...args)
T lock(T...args)
void MessageSvc::eraseMessage ( const StatusCode code,
const Message message 
)
override

Definition at line 555 of file MessageSvc.cpp.

555  {
557 
558  erase_if( m_messageMap, m_messageMap.equal_range( key ),
559  [&]( MessageMap::const_reference j ) { return j.second == msg; } );
560 }
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
MessageMap m_messageMap
Message map.
Definition: MessageSvc.h:179
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
Definition: MessageSvc.h:212
T lock(T...args)
T equal_range(T...args)
void MessageSvc::eraseStream ( )
override

Definition at line 474 of file MessageSvc.cpp.

474 { m_streamMap.clear(); }
StreamMap m_streamMap
Stream map.
Definition: MessageSvc.h:178
T clear(T...args)
void MessageSvc::eraseStream ( int  message_type)
override

Definition at line 483 of file MessageSvc.cpp.

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

Definition at line 492 of file MessageSvc.cpp.

492  {
493  if ( stream ) {
494  erase_if( m_streamMap, m_streamMap.equal_range( key ),
495  [&]( StreamMap::const_reference j ) { return j.second.second == stream; } );
496  }
497 }
StreamMap m_streamMap
Stream map.
Definition: MessageSvc.h:178
T equal_range(T...args)
void MessageSvc::eraseStream ( std::ostream stream)
override

Definition at line 506 of file MessageSvc.cpp.

506  {
507  if ( stream ) {
508  erase_if( m_streamMap, [&]( StreamMap::const_reference j ) { return j.second.second == stream; } );
509  }
510 }
StreamMap m_streamMap
Stream map.
Definition: MessageSvc.h:178
StatusCode MessageSvc::finalize ( )
override

Finalize Service.

Definition at line 234 of file MessageSvc.cpp.

234  {
235 
236  m_suppress = false;
237 
238  {
240 
241  if ( m_stats ) {
242  os << "Summarizing all message counts" << std::endl;
243  } else {
244  os << "Listing sources of suppressed message: " << std::endl;
245  }
246 
247  os << "=====================================================" << std::endl;
248  os << " Message Source | Level | Count" << std::endl;
249  os << "-----------------------------+---------+-------------" << std::endl;
250 
251  bool found( false );
252 
253  for ( auto itr = m_sourceMap.begin(); itr != m_sourceMap.end(); ++itr ) {
254  for ( unsigned int ic = 0; ic < MSG::NUM_LEVELS; ++ic ) {
255  if ( ( itr->second.msg[ic] >= m_msgLimit[ic] && m_msgLimit[ic] != 0 ) ||
256  ( m_stats && itr->second.msg[ic] > 0 && ic >= m_statLevel.value() ) ) {
257  os << " ";
258  os.width( 28 );
259  os.setf( std::ios_base::left, std::ios_base::adjustfield );
260  os << itr->first;
261  os << "|";
262 
263  os.width( 8 );
264  os.setf( std::ios_base::right, std::ios_base::adjustfield );
265  os << levelNames[ic];
266  os << " |";
267 
268  os.width( 9 );
269  os << itr->second.msg[ic];
270  os << std::endl;
271 
272  found = true;
273  }
274  }
275  }
276  os << "=====================================================" << std::endl;
277  if ( found || m_stats ) std::cout << os.str();
278  }
279 
280 #ifndef NDEBUG
281  if ( m_inactCount.value() ) {
282 
284  os << "Listing sources of Unprotected and Unseen messages\n";
285 
286  bool found( false );
287 
288  unsigned int ml( 0 );
289  for ( const auto& itr : m_inactiveMap ) {
290  for ( unsigned int ic = 0; ic < MSG::NUM_LEVELS; ++ic ) {
291  if ( itr.second.msg[ic] != 0 && itr.first.length() > ml ) { ml = itr.first.length(); }
292  }
293  }
294 
295  for ( unsigned int i = 0; i < ml + 25; ++i ) os << "=";
296 
297  os << std::endl << " ";
298  os.width( ml + 2 );
299  os.setf( std::ios_base::left, std::ios_base::adjustfield );
300  os << "Message Source";
301  os.width( 1 );
302  os << "| Level | Count" << std::endl;
303 
304  for ( unsigned int i = 0; i < ml + 3; ++i ) os << "-";
305  os << "+---------+-----------" << std::endl;
306 
307  for ( auto itr = m_inactiveMap.begin(); itr != m_inactiveMap.end(); ++itr ) {
308  for ( unsigned int ic = 0; ic < MSG::NUM_LEVELS; ++ic ) {
309  if ( itr->second.msg[ic] != 0 ) {
310  os << " ";
311  os.width( ml + 2 );
312  os.setf( std::ios_base::left, std::ios_base::adjustfield );
313  os << itr->first;
314 
315  os << "|";
316 
317  os.width( 8 );
318  os.setf( std::ios_base::right, std::ios_base::adjustfield );
319  os << levelNames[ic];
320 
321  os << " |";
322 
323  os.width( 9 );
324  os << itr->second.msg[ic];
325 
326  os << std::endl;
327 
328  found = true;
329  }
330  }
331  }
332  for ( unsigned int i = 0; i < ml + 25; ++i ) os << "=";
333  os << std::endl;
334 
335  if ( found ) std::cout << os.str();
336  }
337 #endif
338 
339  return StatusCode::SUCCESS;
340 }
T setf(T...args)
std::map< std::string, MsgAry > m_sourceMap
Definition: MessageSvc.h:192
std::map< std::string, MsgAry > m_inactiveMap
Definition: MessageSvc.h:192
T endl(T...args)
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
Gaudi::Property< bool > m_inactCount
Definition: MessageSvc.h:165
Gaudi::Property< unsigned int > m_statLevel
Definition: MessageSvc.h:133
T width(T...args)
Gaudi::Property< bool > m_stats
Definition: MessageSvc.h:132
std::array< Gaudi::Property< int >, MSG::NUM_LEVELS > m_msgLimit
Definition: MessageSvc.h:155
Gaudi::Property< bool > m_suppress
Definition: MessageSvc.h:164
std::string MessageSvc::getLogColor ( int  logLevel) const
override

Definition at line 597 of file MessageSvc.cpp.

597  {
598  // ---------------------------------------------------------------------------
599  return ( logLevel < MSG::NUM_LEVELS ) ? m_logColorCodes[logLevel] : "";
600 }
std::string m_logColorCodes[MSG::NUM_LEVELS]
Definition: MessageSvc.h:182
void MessageSvc::i_reportMessage ( const Message msg,
int  outputLevel 
)
protectedvirtual

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

Definition at line 353 of file MessageSvc.cpp.

353  {
354  int key = msg.getType();
355 
356  ++m_msgCount[key];
357 
358  const Message* cmsg = &msg;
359 
360  // processing logged streams
361  if ( !m_loggedStreams.empty() ) {
362  auto iLog = m_loggedStreams.find( msg.getSource() );
363  if ( m_loggedStreams.end() != iLog ) { ( *iLog->second ) << *cmsg << std::endl; }
364  }
365 
366  if ( m_suppress.value() || m_stats.value() ) {
367 
368  // Increase the counter of 'key' type of messages for the source and
369  // get the new value.
370  const int nmsg = ++( m_sourceMap[msg.getSource()].msg[key] );
371 
372  if ( m_suppress.value() && m_msgLimit[key] != 0 ) {
373  if ( nmsg > m_msgLimit[key] ) return;
374  if ( nmsg == m_msgLimit[key] ) {
375  std::string txt = levelNames[key] + " message limit (" + std::to_string( m_msgLimit[key].value() ) +
376  ") reached for " + msg.getSource() + ". Suppressing further output.";
377  cmsg = new Message( msg.getSource(), MSG::WARNING, std::move( txt ) );
378  cmsg->setFormat( msg.getFormat() );
379  }
380  }
381  }
382 
383  auto range = m_streamMap.equal_range( key );
384  if ( range.first != m_streamMap.end() ) {
385  std::for_each( range.first, range.second,
386  [&]( StreamMap::const_reference sm ) { *sm.second.second << *cmsg << std::endl; } );
387  } else if ( key >= outputLevel ) {
388  msg.setFormat( m_defaultFormat );
390  if ( !m_color ) {
391  ( *m_defaultStream ) << *cmsg << std::endl << std::flush;
392  } else {
393  ( *m_defaultStream ) << m_logColorCodes[key] << *cmsg << "\033[m" << std::endl << std::flush;
394  }
395  }
396 
397  if ( cmsg != &msg ) { delete cmsg; }
398 }
const std::string & getFormat() const
Get the format string.
Definition: Message.cpp:126
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
T empty(T...args)
StreamMap m_streamMap
Stream map.
Definition: MessageSvc.h:178
std::map< std::string, MsgAry > m_sourceMap
Definition: MessageSvc.h:192
T to_string(T...args)
T endl(T...args)
Gaudi::Property< std::string > m_defaultTimeFormat
Definition: MessageSvc.h:131
T end(T...args)
int getType() const
Get the message type.
Definition: Message.cpp:62
STL class.
std::map< std::string, std::shared_ptr< std::ostream > > m_loggedStreams
Definition: MessageSvc.h:196
Gaudi::Property< bool > m_color
Definition: MessageSvc.h:144
decltype(auto) range(Args &&...args)
Zips multiple containers together to form a single range.
Gaudi::Property< std::string > m_defaultFormat
Definition: MessageSvc.h:130
T move(T...args)
T flush(T...args)
T find(T...args)
void setFormat(std::string msg) const
Set the format string.
Definition: Message.cpp:143
The Message class.
Definition: Message.h:17
void setTimeFormat(std::string timeFormat) const
Set the time format string.
Definition: Message.cpp:174
int outputLevel() const override
Definition: MessageSvc.cpp:563
std::string m_logColorCodes[MSG::NUM_LEVELS]
Definition: MessageSvc.h:182
Gaudi::Property< bool > m_stats
Definition: MessageSvc.h:132
const std::string & getSource() const
Get the message source.
Definition: Message.cpp:78
std::array< int, MSG::NUM_LEVELS > m_msgCount
Definition: MessageSvc.h:194
std::array< Gaudi::Property< int >, MSG::NUM_LEVELS > m_msgLimit
Definition: MessageSvc.h:155
T for_each(T...args)
Gaudi::Property< bool > m_suppress
Definition: MessageSvc.h:164
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 439 of file MessageSvc.cpp.

439  {
440  int level = outputLevel( source );
441  auto report = [&]( Message mesg ) {
442  mesg.setSource( source );
443  Message stat_code( source, mesg.getType(), "Status Code " + std::to_string( code.getCode() ) );
444  i_reportMessage( std::move( stat_code ), level );
445  i_reportMessage( std::move( mesg ), level );
446  };
447 
448  auto range = m_messageMap.equal_range( code );
449  if ( range.first != m_messageMap.end() ) {
450  std::for_each( range.first, range.second, [&]( MessageMap::const_reference sm ) { report( sm.second ); } );
451  } else {
452  report( m_defaultMessage );
453  }
454 }
virtual void i_reportMessage(const Message &msg, int outputLevel)
Internal implementation of reportMessage(const Message&,int) without lock.
Definition: MessageSvc.cpp:353
Message m_defaultMessage
Default Message.
Definition: MessageSvc.h:177
T to_string(T...args)
MessageMap m_messageMap
Message map.
Definition: MessageSvc.h:179
T end(T...args)
decltype(auto) range(Args &&...args)
Zips multiple containers together to form a single range.
T move(T...args)
The Message class.
Definition: Message.h:17
int outputLevel() const override
Definition: MessageSvc.cpp:563
code_t getCode() const
Retrieve value ("checks" the StatusCode)
Definition: StatusCode.h:137
T for_each(T...args)
T equal_range(T...args)
void MessageSvc::incrInactiveCount ( MSG::Level  level,
const std::string src 
)
override

Definition at line 606 of file MessageSvc.cpp.

606  {
607  ++( m_inactiveMap[source].msg[level] );
608 
611  std::cout << "== inactive message detected from " << source << " ==" << std::endl;
612  std::string t;
613  System::backTrace( t, 25, 0 );
614  std::cout << t << std::endl;
615  }
616 }
std::map< std::string, MsgAry > m_inactiveMap
Definition: MessageSvc.h:192
T endl(T...args)
Gaudi::Property< std::vector< std::string > > m_tracedInactiveSources
Definition: MessageSvc.h:167
GAUDI_API int backTrace(void **addresses, const int depth)
STL class.
T find(T...args)
AttribStringParser::Iterator begin(const AttribStringParser &parser)
StatusCode MessageSvc::initialize ( )
override

Initialize Service.

Definition at line 106 of file MessageSvc.cpp.

106  {
108  if ( sc.isFailure() ) return sc;
109 
110 #ifdef _WIN32
111  m_color = false;
112 #endif
113 
114  // make sure the map of logged stream names is initialized
115  setupLogStreams();
116 
117  return StatusCode::SUCCESS;
118 }
StatusCode initialize() override
Definition: Service.cpp:60
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
void setupLogStreams()
Definition: MessageSvc.cpp:619
bool isFailure() const
Definition: StatusCode.h:130
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
Gaudi::Property< bool > m_color
Definition: MessageSvc.h:144
void MessageSvc::insertMessage ( const StatusCode code,
const Message message 
)
override

Definition at line 519 of file MessageSvc.cpp.

519  {
521  m_messageMap.emplace( key, msg );
522 }
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
MessageMap m_messageMap
Message map.
Definition: MessageSvc.h:179
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
Definition: MessageSvc.h:212
T lock(T...args)
T emplace(T...args)
void MessageSvc::insertStream ( int  message_type,
const std::string name,
std::ostream stream 
)
override

Definition at line 463 of file MessageSvc.cpp.

463  {
464  m_streamMap.emplace( key, NamedStream( name, stream ) );
465 }
StreamMap m_streamMap
Stream map.
Definition: MessageSvc.h:178
std::pair< std::string, std::ostream * > NamedStream
Definition: MessageSvc.h:32
T emplace(T...args)
int MessageSvc::messageCount ( MSG::Level  logLevel) const
override

Definition at line 603 of file MessageSvc.cpp.

603 { return m_msgCount[level]; }
std::array< int, MSG::NUM_LEVELS > m_msgCount
Definition: MessageSvc.h:194
int MessageSvc::outputLevel ( ) const
override

Definition at line 563 of file MessageSvc.cpp.

563  {
564  // ---------------------------------------------------------------------------
565  return m_outputLevel;
566 }
Gaudi::Property< int > m_outputLevel
Definition: Service.h:176
int MessageSvc::outputLevel ( const std::string source) const
override

Definition at line 569 of file MessageSvc.cpp.

569  {
570  // ---------------------------------------------------------------------------
572  auto it = m_thresholdMap.find( source );
573  return it != m_thresholdMap.end() ? it->second : m_outputLevel.value();
574 }
Gaudi::Property< int > m_outputLevel
Definition: Service.h:176
T end(T...args)
ThresholdMap m_thresholdMap
Output level threshold map.
Definition: MessageSvc.h:180
T lock(T...args)
T find(T...args)
std::recursive_mutex m_thresholdMapMutex
Mutex to synchronize multiple access to m_thresholdMap (.
Definition: MessageSvc.h:216
StatusCode MessageSvc::reinitialize ( )
override

Reinitialize Service.

Definition at line 123 of file MessageSvc.cpp.

123  {
125  return initialize();
126 }
Gaudi::StateMachine::State m_state
Service state.
Definition: Service.h:153
StatusCode initialize() override
Initialize Service.
Definition: MessageSvc.cpp:106
void MessageSvc::reportMessage ( const Message message)
override

Definition at line 406 of file MessageSvc.cpp.

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

Definition at line 348 of file MessageSvc.cpp.

348  {
351 }
virtual void i_reportMessage(const Message &msg, int outputLevel)
Internal implementation of reportMessage(const Message&,int) without lock.
Definition: MessageSvc.cpp:353
T lock(T...args)
std::recursive_mutex m_reportMutex
Mutex to synchronize multiple threads printing.
Definition: MessageSvc.h:209
int outputLevel() const override
Definition: MessageSvc.cpp:563
void MessageSvc::reportMessage ( const StatusCode code,
const std::string source = "" 
)
override

Definition at line 434 of file MessageSvc.cpp.

434  {
436  i_reportMessage( code, source );
437 }
virtual void i_reportMessage(const Message &msg, int outputLevel)
Internal implementation of reportMessage(const Message&,int) without lock.
Definition: MessageSvc.cpp:353
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
Definition: MessageSvc.h:212
T lock(T...args)
void MessageSvc::reportMessage ( const char *  source,
int  type,
const char *  message 
)
override

Definition at line 414 of file MessageSvc.cpp.

414  {
415  reportMessage( Message{source, type, message} );
416 }
void reportMessage(const Message &message) override
Definition: MessageSvc.cpp:406
The Message class.
Definition: Message.h:17
void MessageSvc::reportMessage ( const std::string source,
int  type,
const std::string message 
)
override

Definition at line 424 of file MessageSvc.cpp.

424  {
425  reportMessage( Message{source, type, message} );
426 }
void reportMessage(const Message &message) override
Definition: MessageSvc.cpp:406
The Message class.
Definition: Message.h:17
void MessageSvc::setDefaultStream ( std::ostream stream)
inlineoverride

Definition at line 93 of file MessageSvc.h.

93  {
95  m_defaultStream = stream;
96  }
std::ostream * m_defaultStream
Pointer to the output stream.
Definition: MessageSvc.h:176
T lock(T...args)
std::recursive_mutex m_reportMutex
Mutex to synchronize multiple threads printing.
Definition: MessageSvc.h:209
void MessageSvc::setOutputLevel ( int  new_level)
override

Definition at line 577 of file MessageSvc.cpp.

577  {
578  // ---------------------------------------------------------------------------
579  m_outputLevel = new_level;
580 }
Gaudi::Property< int > m_outputLevel
Definition: Service.h:176
void MessageSvc::setOutputLevel ( const std::string source,
int  new_level 
)
override

Definition at line 583 of file MessageSvc.cpp.

583  {
584  // ---------------------------------------------------------------------------
586 
587  // only write if we really have to...
588  auto i = m_thresholdMap.find( source );
589  if ( i == m_thresholdMap.end() ) {
590  m_thresholdMap[source] = level;
591  } else if ( i->second != level ) {
592  i->second = level;
593  }
594 }
T end(T...args)
ThresholdMap m_thresholdMap
Output level threshold map.
Definition: MessageSvc.h:180
T lock(T...args)
T find(T...args)
std::recursive_mutex m_thresholdMapMutex
Mutex to synchronize multiple access to m_thresholdMap (.
Definition: MessageSvc.h:216
void MessageSvc::setupColors ( Gaudi::Details::PropertyBase prop)
private

Definition at line 130 of file MessageSvc.cpp.

130  {
131  const std::string& pname = prop.name();
132  int level;
133  if ( pname == "fatalColorCode" )
134  level = MSG::FATAL;
135  else if ( pname == "errorColorCode" )
136  level = MSG::ERROR;
137  else if ( pname == "warningColorCode" )
138  level = MSG::WARNING;
139  else if ( pname == "infoColorCode" )
140  level = MSG::INFO;
141  else if ( pname == "debugColorCode" )
142  level = MSG::DEBUG;
143  else if ( pname == "verboseColorCode" )
144  level = MSG::VERBOSE;
145  else if ( pname == "alwaysColorCode" )
146  level = MSG::ALWAYS;
147  else {
148  throw GaudiException( "ERROR: Unknown message color parameter: " + pname, name(), StatusCode::FAILURE );
149  }
150 
151  auto& code = m_logColorCodes[level];
152 
153  const auto& col_desc = m_logColors[level].value();
154 
155  if ( col_desc.size() == 1 ) {
156  const std::string& desc = col_desc[0];
157  if ( desc.empty() ) {
158  code = "";
159  } else if ( desc[0] == '[' ) {
160  code = "\033" + desc;
161  } else {
162  code = "\033[" + colTrans( desc, 90 ) + ";1m";
163  }
164  } else if ( col_desc.size() == 2 ) {
165  code = "\033[" + colTrans( col_desc[0], 90 ) + ";" + colTrans( col_desc[1], 100 ) + ";1m";
166  } else { // empty desc: no color
167  code = "";
168  }
169 }
T empty(T...args)
Define general base for Gaudi exception.
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:274
const std::string name() const
property name
Definition: Property.h:36
STL class.
std::array< Gaudi::Property< std::vector< std::string > >, MSG::NUM_LEVELS > m_logColors
Definition: MessageSvc.h:146
constexpr static const auto FAILURE
Definition: StatusCode.h:86
std::string m_logColorCodes[MSG::NUM_LEVELS]
Definition: MessageSvc.h:182
void MessageSvc::setupInactCount ( Gaudi::Details::PropertyBase prop)
private

Definition at line 224 of file MessageSvc.cpp.

224  {
225  if ( prop.name() == "countInactive" ) {
226  Gaudi::Property<bool>* p = dynamic_cast<Gaudi::Property<bool>*>( &prop );
227  if ( p ) MsgStream::enableCountInactive( p->value() );
228  }
229 }
Implementation of property with value of concrete type.
Definition: Property.h:352
const std::string name() const
property name
Definition: Property.h:36
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:525
static GAUDI_API bool enableCountInactive(bool value=true)
Enable/disable the count of inactive messages.
Definition: MsgStream.cpp:31
void MessageSvc::setupLimits ( Gaudi::Details::PropertyBase prop)
private

Definition at line 172 of file MessageSvc.cpp.

172  {
173  // Just report problems in the settings of the limits and unknown limit parameters
174  if ( prop.name() == "alwaysLimit" ) {
175  Gaudi::Property<int>* p = dynamic_cast<Gaudi::Property<int>*>( &prop );
176  if ( p && p->value() != 0 ) {
177  std::cout << "MessageSvc ERROR: cannot suppress ALWAYS messages" << std::endl;
178  p->setValue( 0 );
179  }
180  } else if ( prop.name() == "defaultLimit" ) {
181  for ( int i = MSG::VERBOSE; i < MSG::NUM_LEVELS; ++i ) {
182  if ( i != MSG::ALWAYS ) { m_msgLimit[i] = m_msgLimit[MSG::NIL].value(); }
183  }
184  } else if ( prop.name() != "fatalLimit" && prop.name() != "errorLimit" && prop.name() != "warningLimit" &&
185  prop.name() == "infoLimit" && prop.name() == "debugLimit" && prop.name() == "verboseLimit" ) {
186  std::cout << "MessageSvc ERROR: Unknown message limit parameter: " << prop.name() << std::endl;
187  return;
188  }
189 }
bool setValue(const ValueType &v)
Definition: Property.h:527
Implementation of property with value of concrete type.
Definition: Property.h:352
const std::string name() const
property name
Definition: Property.h:36
T endl(T...args)
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:525
std::array< Gaudi::Property< int >, MSG::NUM_LEVELS > m_msgLimit
Definition: MessageSvc.h:155
void MessageSvc::setupLogStreams ( )
private

Definition at line 619 of file MessageSvc.cpp.

619  {
620  // reset state
622 
623  for ( auto& iProp : m_loggedStreamsName ) {
624 
625  std::set<std::string> outFileNames;
626  for ( auto& jProp : m_loggedStreamsName ) {
627  if ( jProp.first != iProp.first ) { outFileNames.insert( jProp.second ); }
628  }
629  tee( iProp.first, iProp.second, outFileNames );
630 
631  } //> loop over property entries
632 }
std::map< std::string, std::shared_ptr< std::ostream > > m_loggedStreams
Definition: MessageSvc.h:196
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:635
Gaudi::Property< std::map< std::string, std::string > > m_loggedStreamsName
Definition: MessageSvc.h:173
void MessageSvc::setupThreshold ( Gaudi::Details::PropertyBase prop)
private

Definition at line 192 of file MessageSvc.cpp.

192  {
193 
194  static const std::array<std::pair<const char*, MSG::Level>, 7> tbl{{{"setFatal", MSG::FATAL},
195  {"setError", MSG::ERROR},
196  {"setWarning", MSG::WARNING},
197  {"setInfo", MSG::INFO},
198  {"setDebug", MSG::DEBUG},
199  {"setVerbose", MSG::VERBOSE},
200  {"setAlways", MSG::ALWAYS}}};
201 
202  auto i = std::find_if( std::begin( tbl ), std::end( tbl ),
203  [&]( const std::pair<const char*, MSG::Level>& t ) { return prop.name() == t.first; } );
204  if ( i == std::end( tbl ) ) {
205  std::cerr << "MessageSvc ERROR: Unknown message threshold parameter: " << prop.name() << std::endl;
206  return;
207  }
208  int ic = i->second;
209 
211  if ( !sap ) {
212  std::cerr << "could not dcast " << prop.name()
213  << " to a Gaudi::Property<std::vector<std::string>> (which it should be!)" << std::endl;
214  } else {
215  for ( auto& i : sap->value() ) setOutputLevel( i, ic );
216  }
217 }
Implementation of property with value of concrete type.
Definition: Property.h:352
const std::string name() const
property name
Definition: Property.h:36
T endl(T...args)
T end(T...args)
void setOutputLevel(int new_level) override
Definition: MessageSvc.cpp:577
T find_if(T...args)
T begin(T...args)
STL class.
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:525
void MessageSvc::tee ( const std::string sourceName,
const std::string logFileName,
const std::set< std::string > &  declaredOutFileNames 
)
private

Definition at line 635 of file MessageSvc.cpp.

636  {
637  const std::ios_base::openmode openMode = std::ios_base::out | std::ios_base::trunc;
638 
639  auto iStream = m_loggedStreams.find( sourceName );
640  if ( iStream != std::end( m_loggedStreams ) ) { m_loggedStreams.erase( iStream ); }
641 
642  // before creating a new ofstream, make sure there is no already existing
643  // one with the same file name...
644  for ( auto& iStream : m_loggedStreams ) {
645  if ( outFileNames.find( outFileName ) != outFileNames.end() ) {
646  m_loggedStreams[sourceName] = m_loggedStreams[iStream.first];
647  return;
648  }
649  }
650 
651  auto out = std::make_shared<std::ofstream>( outFileName, openMode );
652  if ( out->good() ) m_loggedStreams[sourceName] = std::move( out );
653 }
T end(T...args)
std::map< std::string, std::shared_ptr< std::ostream > > m_loggedStreams
Definition: MessageSvc.h:196
T erase(T...args)
T move(T...args)
T find(T...args)
bool MessageSvc::useColor ( ) const
inlineoverride

Definition at line 111 of file MessageSvc.h.

111 { return m_color; }
Gaudi::Property< bool > m_color
Definition: MessageSvc.h:144

Member Data Documentation

Gaudi::Property<bool> MessageSvc::m_color {this, "useColors", false, ""}
private

Definition at line 144 of file MessageSvc.h.

Gaudi::Property<std::string> MessageSvc::m_defaultFormat {this, "Format", Message::getDefaultFormat(), ""}
private

Definition at line 130 of file MessageSvc.h.

Message MessageSvc::m_defaultMessage
private

Default Message.

Definition at line 177 of file MessageSvc.h.

std::ostream* MessageSvc::m_defaultStream = &std::cout
private

Pointer to the output stream.

Definition at line 176 of file MessageSvc.h.

Gaudi::Property<std::string> MessageSvc::m_defaultTimeFormat {this, "timeFormat", Message::getDefaultTimeFormat(), ""}
private

Definition at line 131 of file MessageSvc.h.

Gaudi::Property<bool> MessageSvc::m_inactCount {this, "countInactive", false, &MessageSvc::setupInactCount, ""}
private

Definition at line 165 of file MessageSvc.h.

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

Definition at line 192 of file MessageSvc.h.

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

Definition at line 182 of file MessageSvc.h.

std::array<Gaudi::Property<std::vector<std::string> >, MSG::NUM_LEVELS> MessageSvc::m_logColors
private
Initial value:
{{{},
{this, "verboseColorCode"},
{this, "debugColorCode"},
{this, "infoColorCode"},
{this, "warningColorCode"},
{this, "errorColorCode"},
{this, "fatalColorCode"},
{this, "alwaysColorCode"}}}

Definition at line 146 of file MessageSvc.h.

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

Definition at line 196 of file MessageSvc.h.

Gaudi::Property<std::map<std::string, std::string> > MessageSvc::m_loggedStreamsName
private
Initial value:
{
this, "loggedStreams", {}, "MessageStream sources we want to dump into a logfile"}

Definition at line 173 of file MessageSvc.h.

MessageMap MessageSvc::m_messageMap
private

Message map.

Definition at line 179 of file MessageSvc.h.

std::recursive_mutex MessageSvc::m_messageMapMutex
mutableprivate

Mutex to synchronize multiple access to m_messageMap.

Definition at line 212 of file MessageSvc.h.

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

Definition at line 194 of file MessageSvc.h.

std::array<Gaudi::Property<int>, MSG::NUM_LEVELS> MessageSvc::m_msgLimit
private
Initial value:
{{{this, "defaultLimit", 500},
{this, "verboseLimit", 500},
{this, "debugLimit", 500},
{this, "infoLimit", 500},
{this, "warningLimit", 500},
{this, "errorLimit", 500},
{this, "fatalLimit", 500},
{this, "alwaysLimit", 0}}}

Definition at line 155 of file MessageSvc.h.

std::recursive_mutex MessageSvc::m_reportMutex
mutableprivate

Mutex to synchronize multiple threads printing.

Definition at line 209 of file MessageSvc.h.

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

Definition at line 192 of file MessageSvc.h.

Gaudi::Property<unsigned int> MessageSvc::m_statLevel {this, "statLevel", 0, ""}
private

Definition at line 133 of file MessageSvc.h.

Gaudi::Property<bool> MessageSvc::m_stats {this, "showStats", false, ""}
private

Definition at line 132 of file MessageSvc.h.

StreamMap MessageSvc::m_streamMap
private

Stream map.

Definition at line 178 of file MessageSvc.h.

Gaudi::Property<bool> MessageSvc::m_suppress {this, "enableSuppression", false, ""}
private

Definition at line 164 of file MessageSvc.h.

ThresholdMap MessageSvc::m_thresholdMap
private

Output level threshold map.

Definition at line 180 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 216 of file MessageSvc.h.

std::array<Gaudi::Property<std::vector<std::string> >, MSG::NUM_LEVELS> MessageSvc::m_thresholdProp
private
Initial value:
{{{},
{this, "setVerbose"},
{this, "setDebug"},
{this, "setInfo"},
{this, "setWarning"},
{this, "setError"},
{this, "setFatal"},
{this, "setAlways"}}}

Definition at line 135 of file MessageSvc.h.

Gaudi::Property<std::vector<std::string> > MessageSvc::m_tracedInactiveSources
private
Initial value:
{
this,
"tracedInactiveSources",
{},
"for each message source specified, print a stack trace for the unprotected and unseen messages"}

Definition at line 167 of file MessageSvc.h.


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