The Gaudi Framework  v40r0 (475e45c1)
MessageSvc Class Reference

#include </builds/gaudi/Gaudi/GaudiCoreSvc/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, std::less<> > 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
 
StatusCode initialize () override
 
StatusCode finalize () override
 
void reportMessage (const Message &message) override
 
void reportMessage (const Message &msg, int outputLevel) override
 
void reportMessage (const StatusCode &code, std::string_view source="") override
 
void reportMessage (std::string source, int type, std::string message) override
 
void insertMessage (const StatusCode &code, 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, 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::ostream * defaultStream () const override
 
void setDefaultStream (std::ostream *stream) override
 
int outputLevel () const override
 
int outputLevel (std::string_view source) const override
 
void setOutputLevel (int new_level) override
 
void setOutputLevel (std::string_view 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, std::string_view src) override
 
- Public Member Functions inherited from extends< Service, IMessageSvc, IInactiveMessageCounter >
void const * 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::string > getInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
- Public Member Functions inherited from Service
const std::string & name () 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...
 
template<typename IFace = IService>
SmartIF< IFace > service (const std::string &name, bool createIf=true) const
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, bool createIf=true)
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, const std::string &toolTypeAndName, bool createIf=true)
 Declare used tool. More...
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none")
 
template<class T >
void addToolsArray (ToolHandleArray< T > &hndlArr)
 
const std::vector< IAlgTool * > & tools () const
 
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, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
 Declare a PropertyBase instance setting name and documentation. More...
 
 requires (!Gaudi::Details::is_gaudi_property_v< TYPE >) Gaudi
 Helper to wrap a regular data member and use it as a regular property. More...
 
Gaudi::Details::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p) override
 set the property from another property with a different name More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p)
 Set the property from a property. More...
 
virtual StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p)=0
 Set the property from a property with a different name. More...
 
virtual StatusCode setProperty (const std::string &s)=0
 Set the property by string. More...
 
StatusCode setProperty (const std::string &name, const char *v)
 Special case for string literals. More...
 
StatusCode setProperty (const std::string &name, const std::string &v)
 Special case for std::string. More...
 
StatusCode setPropertyRepr (const std::string &n, const std::string &r) override
 set the property from name and value string representation More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (std::string_view name) const override
 get the property by name More...
 
StatusCode getProperty (std::string_view 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 (std::string_view name) const override
 Return true if we have a property with the given name. More...
 
Gaudi::Details::PropertyBaseproperty (std::string_view name) const
 \fixme property and bindPropertiesTo should be protected More...
 
void bindPropertiesTo (Gaudi::Interfaces::IOptionsSvc &optsSvc)
 
 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...
 

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, std::string_view source)
 Internal implementation of reportMessage(const StatusCode&,const std::string&) without lock. More...
 
- Protected Member Functions inherited from Service
std::vector< IAlgTool * > & tools ()
 
 ~Service () override
 
int outputLevel () const
 get the Service's output level More...
 
- 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 ()
 

Private Attributes

Gaudi::Property< std::string > m_defaultFormat { this, "Format", Message::getDefaultFormat(), "" }
 
Gaudi::Property< std::string > m_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, std::less<> > > m_loggedStreamsName
 
std::ostream * m_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, MsgAry, std::less<> > m_sourceMap
 
std::map< std::string, MsgAry, std::less<> > m_inactiveMap
 
std::array< int, MSG::NUM_LEVELSm_msgCount
 
std::map< std::string, std::shared_ptr< std::ostream >, std::less<> > 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" }
 flag indicating whether ToolHandle tools have been added to m_tools More...
 
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()" }
 
Gaudi::Property< bool > m_autoRetrieveTools
 
Gaudi::Property< bool > m_checkToolDeps
 
SmartIF< IAuditorSvcm_pAuditorSvc
 Auditor Service
More...
 

Detailed Description

Definition at line 35 of file MessageSvc.h.

Member Typedef Documentation

◆ MessageMap

typedef std::multimap<StatusCode, Message> MessageSvc::MessageMap

Definition at line 39 of file MessageSvc.h.

◆ NamedStream

typedef std::pair<std::string, std::ostream*> MessageSvc::NamedStream

Definition at line 37 of file MessageSvc.h.

◆ StreamMap

typedef std::multimap<int, NamedStream> MessageSvc::StreamMap

Definition at line 38 of file MessageSvc.h.

◆ ThresholdMap

typedef std::map<std::string, int, std::less<> > MessageSvc::ThresholdMap

Definition at line 40 of file MessageSvc.h.

Constructor & Destructor Documentation

◆ MessageSvc()

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

Definition at line 69 of file MessageSvc.cpp.

69  : base_class( name, svcloc ) {
70 
72  SmartIF<IAppMgrUI> app = svcloc;
73  if ( app ) app->outputLevelUpdate();
74  } );
75 
76 #ifndef NDEBUG
77  // initialize the MsgStream static flag.
79 #endif
80 
81  for ( int ic = 0; ic < MSG::NUM_LEVELS; ++ic ) {
82  m_logColors[ic].declareUpdateHandler( &MessageSvc::setupColors, this );
83  m_msgLimit[ic].declareUpdateHandler( &MessageSvc::setupLimits, this );
84  m_thresholdProp[ic].declareUpdateHandler( &MessageSvc::setupThreshold, this );
85  }
86 
87  m_logColors[MSG::FATAL].set( { "blue", "red" } );
88  m_logColors[MSG::ERROR].set( { "white", "red" } );
89  m_logColors[MSG::WARNING].set( { "yellow" } );
90 
91  std::fill( std::begin( m_msgCount ), std::end( m_msgCount ), 0 );
92 }

Member Function Documentation

◆ defaultStream()

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

Definition at line 92 of file MessageSvc.h.

92 { return m_defaultStream; }

◆ eraseMessage() [1/3]

void MessageSvc::eraseMessage ( )
override

Definition at line 420 of file MessageSvc.cpp.

420  {
421  auto lock = std::scoped_lock{ m_messageMapMutex };
422  m_messageMap.clear();
423 }

◆ eraseMessage() [2/3]

void MessageSvc::eraseMessage ( const StatusCode code)
override

Definition at line 425 of file MessageSvc.cpp.

425  {
426  auto lock = std::scoped_lock{ m_messageMapMutex };
427  m_messageMap.erase( key );
428 }

◆ eraseMessage() [3/3]

void MessageSvc::eraseMessage ( const StatusCode code,
const Message message 
)
override

Definition at line 430 of file MessageSvc.cpp.

430  {
431  auto lock = std::scoped_lock{ m_messageMapMutex };
432 
433  erase_if( m_messageMap, m_messageMap.equal_range( key ),
434  [&]( MessageMap::const_reference j ) { return j.second == msg; } );
435 }

◆ eraseStream() [1/4]

void MessageSvc::eraseStream ( )
override

Definition at line 398 of file MessageSvc.cpp.

398 { m_streamMap.clear(); }

◆ eraseStream() [2/4]

void MessageSvc::eraseStream ( int  message_type)
override

Definition at line 400 of file MessageSvc.cpp.

400 { m_streamMap.erase( message_type ); }

◆ eraseStream() [3/4]

void MessageSvc::eraseStream ( int  message_type,
std::ostream *  stream 
)
override

Definition at line 402 of file MessageSvc.cpp.

402  {
403  if ( stream ) {
404  erase_if( m_streamMap, m_streamMap.equal_range( key ),
405  [&]( StreamMap::const_reference j ) { return j.second.second == stream; } );
406  }
407 }

◆ eraseStream() [4/4]

void MessageSvc::eraseStream ( std::ostream *  stream)
override

Definition at line 409 of file MessageSvc.cpp.

409  {
410  if ( stream ) {
411  erase_if( m_streamMap, [&]( StreamMap::const_reference j ) { return j.second.second == stream; } );
412  }
413 }

◆ finalize()

StatusCode MessageSvc::finalize ( )
override

Definition at line 207 of file MessageSvc.cpp.

207  {
208  m_suppress = false;
209 
210  {
211  std::ostringstream os;
212 
213  if ( m_stats ) {
214  os << "Summarizing all message counts" << std::endl;
215  } else {
216  os << "Listing sources of suppressed message: " << std::endl;
217  }
218 
219  os << "=====================================================" << std::endl;
220  os << " Message Source | Level | Count" << std::endl;
221  os << "-----------------------------+---------+-------------" << std::endl;
222 
223  bool found( false );
224 
225  for ( auto itr = m_sourceMap.begin(); itr != m_sourceMap.end(); ++itr ) {
226  for ( unsigned int ic = 0; ic < MSG::NUM_LEVELS; ++ic ) {
227  if ( ( itr->second.msg[ic] >= m_msgLimit[ic] && m_msgLimit[ic] != 0 ) ||
228  ( m_stats && itr->second.msg[ic] > 0 && ic >= m_statLevel.value() ) ) {
229  os << " ";
230  os.width( 28 );
231  os.setf( std::ios_base::left, std::ios_base::adjustfield );
232  os << itr->first;
233  os << "|";
234 
235  os.width( 8 );
236  os.setf( std::ios_base::right, std::ios_base::adjustfield );
237  os << levelNames[ic];
238  os << " |";
239 
240  os.width( 9 );
241  os << itr->second.msg[ic];
242  os << std::endl;
243 
244  found = true;
245  }
246  }
247  }
248  os << "=====================================================" << std::endl;
249  if ( found || m_stats ) std::cout << os.str() << std::flush;
250  }
251 
252 #ifndef NDEBUG
253  if ( m_inactCount.value() ) {
254 
255  std::ostringstream os;
256  os << "Listing sources of Unprotected and Unseen messages\n";
257 
258  bool found( false );
259 
260  unsigned int ml( 0 );
261  for ( const auto& itr : m_inactiveMap ) {
262  for ( unsigned int ic = 0; ic < MSG::NUM_LEVELS; ++ic ) {
263  if ( itr.second.msg[ic] != 0 && itr.first.length() > ml ) { ml = itr.first.length(); }
264  }
265  }
266 
267  for ( unsigned int i = 0; i < ml + 25; ++i ) os << "=";
268 
269  os << std::endl << " ";
270  os.width( ml + 2 );
271  os.setf( std::ios_base::left, std::ios_base::adjustfield );
272  os << "Message Source";
273  os.width( 1 );
274  os << "| Level | Count" << std::endl;
275 
276  for ( unsigned int i = 0; i < ml + 3; ++i ) os << "-";
277  os << "+---------+-----------" << std::endl;
278 
279  for ( auto itr = m_inactiveMap.begin(); itr != m_inactiveMap.end(); ++itr ) {
280  for ( unsigned int ic = 0; ic < MSG::NUM_LEVELS; ++ic ) {
281  if ( itr->second.msg[ic] != 0 ) {
282  os << " ";
283  os.width( ml + 2 );
284  os.setf( std::ios_base::left, std::ios_base::adjustfield );
285  os << itr->first;
286 
287  os << "|";
288 
289  os.width( 8 );
290  os.setf( std::ios_base::right, std::ios_base::adjustfield );
291  os << levelNames[ic];
292 
293  os << " |";
294 
295  os.width( 9 );
296  os << itr->second.msg[ic];
297 
298  os << std::endl;
299 
300  found = true;
301  }
302  }
303  }
304  for ( unsigned int i = 0; i < ml + 25; ++i ) os << "=";
305  os << std::endl;
306 
307  if ( found ) std::cout << os.str() << std::flush;
308  }
309 #endif
310 
311  return StatusCode::SUCCESS;
312 }

◆ getLogColor()

std::string MessageSvc::getLogColor ( int  logLevel) const
override

Definition at line 459 of file MessageSvc.cpp.

459  {
460  return ( logLevel < MSG::NUM_LEVELS ) ? m_logColorCodes[logLevel] : "";
461 }

◆ i_reportMessage() [1/2]

void MessageSvc::i_reportMessage ( const Message msg,
int  outputLevel 
)
protectedvirtual

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

Definition at line 319 of file MessageSvc.cpp.

319  {
320  int key = msg.getType();
321 
322  ++m_msgCount[key];
323 
324  const Message* cmsg = &msg;
325 
326  // processing logged streams
327  if ( !m_loggedStreams.empty() ) {
328  auto iLog = m_loggedStreams.find( msg.getSource() );
329  if ( m_loggedStreams.end() != iLog ) { ( *iLog->second ) << *cmsg << std::endl; }
330  }
331 
332  if ( m_suppress.value() || m_stats.value() ) {
333 
334  // Increase the counter of 'key' type of messages for the source and
335  // get the new value.
336  const int nmsg = ++( m_sourceMap[msg.getSource()].msg[key] );
337 
338  if ( m_suppress.value() && m_msgLimit[key] != 0 ) {
339  if ( nmsg > m_msgLimit[key] ) return;
340  if ( nmsg == m_msgLimit[key] ) {
341  std::string txt = levelNames[key] + " message limit (" + std::to_string( m_msgLimit[key].value() ) +
342  ") reached for " + msg.getSource() + ". Suppressing further output.";
343  cmsg = new Message( msg.getSource(), MSG::WARNING, std::move( txt ) );
344  cmsg->setFormat( msg.getFormat() );
345  }
346  }
347  }
348 
349  auto range = m_streamMap.equal_range( key );
350  if ( range.first != m_streamMap.end() ) {
351  std::for_each( range.first, range.second,
352  [&]( StreamMap::const_reference sm ) { *sm.second.second << *cmsg << std::endl; } );
353  } else if ( key >= outputLevel ) {
354  msg.setFormat( m_defaultFormat );
355  msg.setTimeFormat( m_defaultTimeFormat );
356  if ( !m_color ) {
357  ( *m_defaultStream ) << *cmsg << std::endl << std::flush;
358  } else {
359  ( *m_defaultStream ) << m_logColorCodes[key] << *cmsg << "\033[m" << std::endl << std::flush;
360  }
361  }
362 
363  if ( cmsg != &msg ) { delete cmsg; } // cppcheck-suppress autovarInvalidDeallocation; false positive
364 }

◆ i_reportMessage() [2/2]

void MessageSvc::i_reportMessage ( const StatusCode code,
std::string_view  source 
)
protectedvirtual

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

Definition at line 377 of file MessageSvc.cpp.

377  {
378  int level = outputLevel( source );
379  auto report = [&]( Message mesg ) {
380  mesg.setSource( source );
381  Message stat_code( std::string{ source }, mesg.getType(), "Status Code " + std::to_string( code.getCode() ) );
382  i_reportMessage( std::move( stat_code ), level );
383  i_reportMessage( std::move( mesg ), level );
384  };
385 
386  auto range = m_messageMap.equal_range( code );
387  if ( range.first != m_messageMap.end() ) {
388  std::for_each( range.first, range.second, [&]( MessageMap::const_reference sm ) { report( sm.second ); } );
389  } else {
390  report( m_defaultMessage );
391  }
392 }

◆ incrInactiveCount()

void MessageSvc::incrInactiveCount ( MSG::Level  level,
std::string_view  src 
)
override

Definition at line 465 of file MessageSvc.cpp.

465  {
466  auto entry = m_inactiveMap.find( source );
467  if ( entry == m_inactiveMap.end() ) { entry = m_inactiveMap.emplace( source, MsgAry{} ).first; }
468  ++entry->second.msg[level];
469 
470  if ( std::find( begin( m_tracedInactiveSources ), end( m_tracedInactiveSources ), source ) !=
472  std::cout << "== inactive message detected from " << source << " ==\n";
473  std::string t;
474  System::backTrace( t, 25, 0 );
475  std::cout << t << std::endl;
476  }
477 }

◆ initialize()

StatusCode MessageSvc::initialize ( )
override

Definition at line 94 of file MessageSvc.cpp.

94  {
96  if ( sc.isFailure() ) return sc;
97 
98 #ifdef _WIN32
99  m_color = false;
100 #endif
101 
102  // make sure the map of logged stream names is initialized
103  setupLogStreams();
104 
105  return StatusCode::SUCCESS;
106 }

◆ insertMessage()

void MessageSvc::insertMessage ( const StatusCode code,
Message  message 
)
override

Definition at line 415 of file MessageSvc.cpp.

415  {
416  auto lock = std::scoped_lock{ m_messageMapMutex };
417  m_messageMap.emplace( key, std::move( msg ) );
418 }

◆ insertStream()

void MessageSvc::insertStream ( int  message_type,
std::string  name,
std::ostream *  stream 
)
override

Definition at line 394 of file MessageSvc.cpp.

394  {
395  m_streamMap.emplace( key, NamedStream( std::move( name ), stream ) );
396 }

◆ messageCount()

int MessageSvc::messageCount ( MSG::Level  logLevel) const
override

Definition at line 463 of file MessageSvc.cpp.

463 { return m_msgCount[level]; }

◆ outputLevel() [1/2]

int MessageSvc::outputLevel ( ) const
override

Definition at line 437 of file MessageSvc.cpp.

437 { return m_outputLevel; }

◆ outputLevel() [2/2]

int MessageSvc::outputLevel ( std::string_view  source) const
override

Definition at line 439 of file MessageSvc.cpp.

439  {
440  auto lock = std::scoped_lock{ m_thresholdMapMutex };
441  auto it = m_thresholdMap.find( source );
442  return it != m_thresholdMap.end() ? it->second : m_outputLevel.value();
443 }

◆ reinitialize()

StatusCode MessageSvc::reinitialize ( )
override

Definition at line 108 of file MessageSvc.cpp.

108  {
110  StatusCode sc = initialize();
112 
113  return sc;
114 }

◆ reportMessage() [1/4]

void MessageSvc::reportMessage ( const Message message)
override

Definition at line 366 of file MessageSvc.cpp.

366 { reportMessage( msg, outputLevel( msg.getSource() ) ); }

◆ reportMessage() [2/4]

void MessageSvc::reportMessage ( const Message msg,
int  outputLevel 
)
override

Definition at line 314 of file MessageSvc.cpp.

314  {
315  auto lock = std::scoped_lock{ m_reportMutex };
317 }

◆ reportMessage() [3/4]

void MessageSvc::reportMessage ( const StatusCode code,
std::string_view  source = "" 
)
override

Definition at line 372 of file MessageSvc.cpp.

372  {
373  auto lock = std::scoped_lock{ m_messageMapMutex };
374  i_reportMessage( code, source );
375 }

◆ reportMessage() [4/4]

void MessageSvc::reportMessage ( std::string  source,
int  type,
std::string  message 
)
override

Definition at line 368 of file MessageSvc.cpp.

368  {
369  reportMessage( Message{ std::move( source ), type, std::move( message ) } );
370 }

◆ setDefaultStream()

void MessageSvc::setDefaultStream ( std::ostream *  stream)
inlineoverride

Definition at line 95 of file MessageSvc.h.

95  {
96  auto lock = std::scoped_lock{ m_reportMutex };
98  }

◆ setOutputLevel() [1/2]

void MessageSvc::setOutputLevel ( int  new_level)
override

Definition at line 445 of file MessageSvc.cpp.

445 { m_outputLevel = new_level; }

◆ setOutputLevel() [2/2]

void MessageSvc::setOutputLevel ( std::string_view  source,
int  new_level 
)
override

Definition at line 447 of file MessageSvc.cpp.

447  {
448  auto lock = std::scoped_lock{ m_thresholdMapMutex };
449 
450  // only write if we really have to...
451  auto i = m_thresholdMap.find( source );
452  if ( i == m_thresholdMap.end() ) {
453  m_thresholdMap.emplace( source, level );
454  } else if ( i->second != level ) {
455  i->second = level;
456  }
457 }

◆ setupColors()

void MessageSvc::setupColors ( Gaudi::Details::PropertyBase prop)
private

Definition at line 116 of file MessageSvc.cpp.

116  {
117  const auto& pname = prop.name();
118  int level =
119  ( pname == "fatalColorCode" ? MSG::FATAL
120  : pname == "errorColorCode" ? MSG::ERROR
121  : pname == "warningColorCode" ? MSG::WARNING
122  : pname == "infoColorCode" ? MSG::INFO
123  : pname == "debugColorCode" ? MSG::DEBUG
124  : pname == "verboseColorCode" ? MSG::VERBOSE
125  : pname == "alwaysColorCode"
126  ? MSG::ALWAYS
127  : ( throw GaudiException( "ERROR: Unknown message color parameter: " + pname, name(), StatusCode::FAILURE ),
128  -1 ) );
129 
130  auto& code = m_logColorCodes[level];
131 
132  const auto& col_desc = m_logColors[level].value();
133 
134  if ( col_desc.size() == 1 ) {
135  const std::string& desc = col_desc[0];
136  if ( desc.empty() ) {
137  code = "";
138  } else if ( desc[0] == '[' ) {
139  code = "\033" + desc;
140  } else {
141  code = "\033[" + colTrans( desc, 90 ) + ";1m";
142  }
143  } else if ( col_desc.size() == 2 ) {
144  code = "\033[" + colTrans( col_desc[0], 90 ) + ";" + colTrans( col_desc[1], 100 ) + ";1m";
145  } else { // empty desc: no color
146  code = "";
147  }
148 }

◆ setupInactCount()

void MessageSvc::setupInactCount ( Gaudi::Details::PropertyBase prop)
private

Definition at line 199 of file MessageSvc.cpp.

199  {
200  if ( prop.name() == "countInactive" ) {
201  Gaudi::Property<bool>* p = dynamic_cast<Gaudi::Property<bool>*>( &prop );
202  if ( p ) MsgStream::enableCountInactive( p->value() );
203  }
204 }

◆ setupLimits()

void MessageSvc::setupLimits ( Gaudi::Details::PropertyBase prop)
private

Definition at line 150 of file MessageSvc.cpp.

150  {
151  // Just report problems in the settings of the limits and unknown limit parameters
152  if ( prop.name() == "alwaysLimit" ) {
153  Gaudi::Property<int>* p = dynamic_cast<Gaudi::Property<int>*>( &prop );
154  if ( p && p->value() != 0 ) {
155  std::cout << "MessageSvc ERROR: cannot suppress ALWAYS messages" << std::endl;
156  p->setValue( 0 );
157  }
158  } else if ( prop.name() == "defaultLimit" ) {
159  for ( int i = MSG::VERBOSE; i < MSG::NUM_LEVELS; ++i ) {
160  if ( i != MSG::ALWAYS ) { m_msgLimit[i] = m_msgLimit[MSG::NIL].value(); }
161  }
162  } else if ( prop.name() != "fatalLimit" && prop.name() != "errorLimit" && prop.name() != "warningLimit" &&
163  prop.name() == "infoLimit" && prop.name() == "debugLimit" && prop.name() == "verboseLimit" ) {
164  std::cout << "MessageSvc ERROR: Unknown message limit parameter: " << prop.name() << std::endl;
165  return;
166  }
167 }

◆ setupLogStreams()

void MessageSvc::setupLogStreams ( )
private

Definition at line 479 of file MessageSvc.cpp.

479  {
480  // reset state
481  m_loggedStreams.clear();
482 
483  // make the unique set of output filenames
484  std::set<std::string_view> outFileNames;
485  std::transform( m_loggedStreamsName.begin(), m_loggedStreamsName.end(),
486  std::inserter( outFileNames, outFileNames.end() ),
487  []( const auto& p ) -> std::string_view { return p.second; } );
488  // map each unique filename to an ofstream
489  std::map<std::string_view, std::shared_ptr<std::ofstream>> outStreams;
490  std::transform( outFileNames.begin(), outFileNames.end(), std::inserter( outStreams, outStreams.end() ),
491  []( std::string_view fname ) {
492  return std::pair{ fname, std::make_shared<std::ofstream>(
493  std::string{ fname }, std::ios_base::out | std::ios_base::trunc ) };
494  } );
495  // associate the stream to ofstream...
496  for ( auto& iProp : m_loggedStreamsName ) {
497  auto& stream = outStreams.at( iProp.second );
498  if ( stream->good() ) m_loggedStreams.emplace( iProp.first, stream );
499  }
500 }

◆ setupThreshold()

void MessageSvc::setupThreshold ( Gaudi::Details::PropertyBase prop)
private

Definition at line 169 of file MessageSvc.cpp.

169  {
170 
171  static const std::array<std::pair<const char*, MSG::Level>, 7> tbl{ { { "setFatal", MSG::FATAL },
172  { "setError", MSG::ERROR },
173  { "setWarning", MSG::WARNING },
174  { "setInfo", MSG::INFO },
175  { "setDebug", MSG::DEBUG },
176  { "setVerbose", MSG::VERBOSE },
177  { "setAlways", MSG::ALWAYS } } };
178 
179  auto i = std::find_if( std::begin( tbl ), std::end( tbl ),
180  [&]( const std::pair<const char*, MSG::Level>& t ) { return prop.name() == t.first; } );
181  if ( i == std::end( tbl ) ) {
182  std::cerr << "MessageSvc ERROR: Unknown message threshold parameter: " << prop.name() << std::endl;
183  return;
184  }
185  int ic = i->second;
186 
188  if ( !sap ) {
189  std::cerr << "could not dcast " << prop.name()
190  << " to a Gaudi::Property<std::vector<std::string>> (which it should be!)" << std::endl;
191  } else {
192  for ( auto& i : sap->value() ) setOutputLevel( i, ic );
193  }
194 }

◆ useColor()

bool MessageSvc::useColor ( ) const
inlineoverride

Definition at line 113 of file MessageSvc.h.

113 { return m_color; }

Member Data Documentation

◆ m_color

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

Definition at line 146 of file MessageSvc.h.

◆ m_defaultFormat

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

Definition at line 132 of file MessageSvc.h.

◆ m_defaultMessage

Message MessageSvc::m_defaultMessage
private

Default Message.

Definition at line 179 of file MessageSvc.h.

◆ m_defaultStream

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

Pointer to the output stream.

Definition at line 178 of file MessageSvc.h.

◆ m_defaultTimeFormat

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

Definition at line 133 of file MessageSvc.h.

◆ m_inactCount

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

Definition at line 167 of file MessageSvc.h.

◆ m_inactiveMap

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

Definition at line 194 of file MessageSvc.h.

◆ m_logColorCodes

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

Definition at line 184 of file MessageSvc.h.

◆ m_logColors

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 148 of file MessageSvc.h.

◆ m_loggedStreams

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

Definition at line 198 of file MessageSvc.h.

◆ m_loggedStreamsName

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

Definition at line 175 of file MessageSvc.h.

◆ m_messageMap

MessageMap MessageSvc::m_messageMap
private

Message map.

Definition at line 181 of file MessageSvc.h.

◆ m_messageMapMutex

std::recursive_mutex MessageSvc::m_messageMapMutex
mutableprivate

Mutex to synchronize multiple access to m_messageMap.

Definition at line 211 of file MessageSvc.h.

◆ m_msgCount

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

Definition at line 196 of file MessageSvc.h.

◆ m_msgLimit

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 157 of file MessageSvc.h.

◆ m_reportMutex

std::recursive_mutex MessageSvc::m_reportMutex
mutableprivate

Mutex to synchronize multiple threads printing.

Definition at line 208 of file MessageSvc.h.

◆ m_sourceMap

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

Definition at line 194 of file MessageSvc.h.

◆ m_statLevel

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

Definition at line 135 of file MessageSvc.h.

◆ m_stats

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

Definition at line 134 of file MessageSvc.h.

◆ m_streamMap

StreamMap MessageSvc::m_streamMap
private

Stream map.

Definition at line 180 of file MessageSvc.h.

◆ m_suppress

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

Definition at line 166 of file MessageSvc.h.

◆ m_thresholdMap

ThresholdMap MessageSvc::m_thresholdMap
private

Output level threshold map.

Definition at line 182 of file MessageSvc.h.

◆ m_thresholdMapMutex

std::recursive_mutex MessageSvc::m_thresholdMapMutex
mutableprivate

Mutex to synchronize multiple access to m_thresholdMap (.

See also
MsgStream::doOutput).

Definition at line 215 of file MessageSvc.h.

◆ m_thresholdProp

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 137 of file MessageSvc.h.

◆ m_tracedInactiveSources

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 169 of file MessageSvc.h.


The documentation for this class was generated from the following files:
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:22
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: PropertyBase.h:34
Gaudi::Details::PropertyBase::name
const std::string name() const
property name
Definition: PropertyBase.h:38
MessageSvc::m_logColors
std::array< Gaudi::Property< std::vector< std::string > >, MSG::NUM_LEVELS > m_logColors
Definition: MessageSvc.h:148
Write.stream
stream
Definition: Write.py:32
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:118
MessageSvc::setupLimits
void setupLimits(Gaudi::Details::PropertyBase &prop)
Definition: MessageSvc.cpp:150
precedence.message
message
Definition: precedence.py:19
MessageSvc::m_stats
Gaudi::Property< bool > m_stats
Definition: MessageSvc.h:134
MsgStream::enableCountInactive
static GAUDI_API bool enableCountInactive(bool value=true)
Enable/disable the count of inactive messages.
Definition: MsgStream.cpp:21
Read.app
app
Definition: Read.py:36
Service::m_state
Gaudi::StateMachine::State m_state
Service state
Definition: Service.h:155
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:314
MSG::INFO
@ INFO
Definition: IMessageSvc.h:22
MessageSvc::m_defaultTimeFormat
Gaudi::Property< std::string > m_defaultTimeFormat
Definition: MessageSvc.h:133
GaudiException
Definition: GaudiException.h:29
MessageSvc::reportMessage
void reportMessage(const Message &message) override
Definition: MessageSvc.cpp:366
GaudiMP.FdsRegistry.msg
msg
Definition: FdsRegistry.py:19
MessageSvc::m_logColorCodes
std::string m_logColorCodes[MSG::NUM_LEVELS]
Definition: MessageSvc.h:184
MessageSvc::m_reportMutex
std::recursive_mutex m_reportMutex
Mutex to synchronize multiple threads printing.
Definition: MessageSvc.h:208
MSG::WARNING
@ WARNING
Definition: IMessageSvc.h:22
MessageSvc::i_reportMessage
virtual void i_reportMessage(const Message &msg, int outputLevel)
Internal implementation of reportMessage(const Message&,int) without lock.
Definition: MessageSvc.cpp:319
System::backTrace
GAUDI_API int backTrace(void **addresses, const int depth)
extends< Service, IMessageSvc, IInactiveMessageCounter >::base_class
extends base_class
Typedef to this class.
Definition: extends.h:23
Gaudi::Property::setValue
bool setValue(const ValueType &v)
Definition: Property.h:231
MessageSvc::m_streamMap
StreamMap m_streamMap
Stream map.
Definition: MessageSvc.h:180
MessageSvc::m_thresholdMapMutex
std::recursive_mutex m_thresholdMapMutex
Mutex to synchronize multiple access to m_thresholdMap (.
Definition: MessageSvc.h:215
MessageSvc::m_msgLimit
std::array< Gaudi::Property< int >, MSG::NUM_LEVELS > m_msgLimit
Definition: MessageSvc.h:157
bug_34121.t
t
Definition: bug_34121.py:31
Gaudi::Utils::begin
AttribStringParser::Iterator begin(const AttribStringParser &parser)
Definition: AttribStringParser.h:135
MessageSvc::m_statLevel
Gaudi::Property< unsigned int > m_statLevel
Definition: MessageSvc.h:135
Service::name
const std::string & name() const override
Retrieve name of the service
Definition: Service.cpp:333
StatusCode
Definition: StatusCode.h:64
Gaudi::cxx::for_each
void for_each(ContainerOfSynced &c, Fun &&f)
Definition: SynchronizedValue.h:98
Message
Definition: Message.h:25
ProduceConsume.j
j
Definition: ProduceConsume.py:104
MessageSvc::m_sourceMap
std::map< std::string, MsgAry, std::less<> > m_sourceMap
Definition: MessageSvc.h:194
Gaudi::StateMachine::OFFLINE
@ OFFLINE
Definition: StateMachine.h:22
Gaudi::Property::declareUpdateHandler
Details::PropertyBase & declareUpdateHandler(std::function< void(Details::PropertyBase &)> fun) override
set new callback for update
Definition: Property.h:135
MessageSvc::m_msgCount
std::array< int, MSG::NUM_LEVELS > m_msgCount
Definition: MessageSvc.h:196
Gaudi::Property::value
const ValueType & value() const
Definition: Property.h:229
Message::setFormat
void setFormat(std::string msg) const
Set the format string.
Definition: Message.cpp:97
MessageSvc::m_defaultMessage
Message m_defaultMessage
Default Message.
Definition: MessageSvc.h:179
MessageSvc::m_thresholdMap
ThresholdMap m_thresholdMap
Output level threshold map.
Definition: MessageSvc.h:182
SmartIF< IAppMgrUI >
MessageSvc::m_defaultStream
std::ostream * m_defaultStream
Pointer to the output stream.
Definition: MessageSvc.h:178
MessageSvc::m_messageMap
MessageMap m_messageMap
Message map.
Definition: MessageSvc.h:181
MessageSvc::setupThreshold
void setupThreshold(Gaudi::Details::PropertyBase &prop)
Definition: MessageSvc.cpp:169
gaudirun.level
level
Definition: gaudirun.py:364
MessageSvc::m_tracedInactiveSources
Gaudi::Property< std::vector< std::string > > m_tracedInactiveSources
Definition: MessageSvc.h:169
MSG::FATAL
@ FATAL
Definition: IMessageSvc.h:22
MessageSvc::m_inactiveMap
std::map< std::string, MsgAry, std::less<> > m_inactiveMap
Definition: MessageSvc.h:194
MessageSvc::outputLevel
int outputLevel() const override
Definition: MessageSvc.cpp:437
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:129
MessageSvc::m_inactCount
Gaudi::Property< bool > m_inactCount
Definition: MessageSvc.h:167
gaudirun.type
type
Definition: gaudirun.py:160
MSG::VERBOSE
@ VERBOSE
Definition: IMessageSvc.h:22
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:99
MessageSvc::m_messageMapMutex
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
Definition: MessageSvc.h:211
MessageSvc::NamedStream
std::pair< std::string, std::ostream * > NamedStream
Definition: MessageSvc.h:37
MessageSvc::m_loggedStreamsName
Gaudi::Property< std::map< std::string, std::string, std::less<> > > m_loggedStreamsName
Definition: MessageSvc.h:175
MSG::ALWAYS
@ ALWAYS
Definition: IMessageSvc.h:22
MSG::NIL
@ NIL
Definition: IMessageSvc.h:22
Gaudi::StateMachine::INITIALIZED
@ INITIALIZED
Definition: StateMachine.h:24
ProduceConsume.Message
Message
Definition: ProduceConsume.py:110
MSG::ERROR
@ ERROR
Definition: IMessageSvc.h:22
MessageSvc::m_color
Gaudi::Property< bool > m_color
Definition: MessageSvc.h:146
StatusCode::getCode
code_t getCode() const
Retrieve value.
Definition: StatusCode.h:136
compareOutputFiles.pname
pname
Definition: compareOutputFiles.py:482
MessageSvc::m_loggedStreams
std::map< std::string, std::shared_ptr< std::ostream >, std::less<> > m_loggedStreams
Definition: MessageSvc.h:198
MessageSvc::initialize
StatusCode initialize() override
Definition: MessageSvc.cpp:94
IOTest.end
end
Definition: IOTest.py:125
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:100
MessageSvc::m_thresholdProp
std::array< Gaudi::Property< std::vector< std::string > >, MSG::NUM_LEVELS > m_thresholdProp
Definition: MessageSvc.h:137
MessageSvc::setupLogStreams
void setupLogStreams()
Definition: MessageSvc.cpp:479
MessageSvc::m_suppress
Gaudi::Property< bool > m_suppress
Definition: MessageSvc.h:166
MSG::NUM_LEVELS
@ NUM_LEVELS
Definition: IMessageSvc.h:22
MessageSvc::m_defaultFormat
Gaudi::Property< std::string > m_defaultFormat
Definition: MessageSvc.h:132
MessageSvc::setOutputLevel
void setOutputLevel(int new_level) override
Definition: MessageSvc.cpp:445
ProduceConsume.key
key
Definition: ProduceConsume.py:84
Service::m_outputLevel
Gaudi::Property< int > m_outputLevel
flag indicating whether ToolHandle tools have been added to m_tools
Definition: Service.h:184
Gaudi::Property< bool >
Gaudi::Functional::details::zip::range
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.
Definition: details.h:102
MessageSvc::setupColors
void setupColors(Gaudi::Details::PropertyBase &prop)
Definition: MessageSvc.cpp:116