ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LoggedMessageSvc Class Reference

#include <LoggedMessageSvc.h>

Inheritance diagram for LoggedMessageSvc:
Collaboration diagram for LoggedMessageSvc:

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, Message > MessageMap
 
typedef std::map< std::string, int, std::less<> > ThresholdMap
 

Public Member Functions

 LoggedMessageSvc (const std::string &name, ISvcLocator *svcloc)
 
virtual ~LoggedMessageSvc ()
 
virtual StatusCode reinitialize () override
 Reinitialize Service. More...
 
virtual StatusCode initialize () override
 Initialize Service. More...
 
virtual StatusCode finalize () override
 Finalize Service. More...
 
virtual void reportMessage (const Message &message) override
 
virtual void reportMessage (const Message &msg, int outputLevel) override
 
virtual void reportMessage (const StatusCode &code, std::string_view source="") override
 
virtual void reportMessage (std::string source, int type, std::string message) override
 
virtual void insertMessage (const StatusCode &code, Message message) override
 
virtual void eraseMessage () override
 
virtual void eraseMessage (const StatusCode &code) override
 
virtual void eraseMessage (const StatusCode &code, const Message &message) override
 
virtual void insertStream (int message_type, std::string name, std::ostream *stream) override
 
virtual void eraseStream () override
 
virtual void eraseStream (int message_type) override
 
virtual void eraseStream (int message_type, std::ostream *stream) override
 
virtual void eraseStream (std::ostream *stream) override
 
virtual std::ostream *defaultStream ATLAS_NOT_CONST_THREAD_SAFE () const override
 
virtual void setDefaultStream (std::ostream *stream) override
 
virtual int outputLevel () const override
 
virtual int outputLevel (std::string_view source) const override
 
virtual void setOutputLevel (int new_level) override
 
virtual void setOutputLevel (std::string_view source, int new_level) override
 
virtual bool useColor () const override
 
virtual std::string getLogColor (int logLevel) const override
 
virtual int messageCount (MSG::Level logLevel) const override
 
virtual void incrInactiveCount (MSG::Level level, std::string_view src) override
 
virtual std::vector< std::pair< std::string, std::string > > getMessages (MSG::Level level) const override
 
virtual std::vector< LoggedMessage > getKeyMessages () const override
 

Private Types

typedef std::map< std::string, MSG::Color > ColorMap
 
typedef std::map< std::string, std::ostream * > LoggedStreamsMap_t
 

Private Member Functions

std::string colTrans (const std::string &, int)
 
void initColors (Gaudi::Details::PropertyBase &prop)
 
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

std::ostream * m_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 controling. More...
 
BooleanProperty m_color
 
BooleanProperty m_stats
 
UnsignedIntegerProperty m_statLevel
 
StringArrayProperty m_logColors [MSG::NUM_LEVELS]
 
IntegerProperty m_msgLimit [MSG::NUM_LEVELS]
 
IntegerProperty m_logLevel
 
StringArrayProperty m_keywords
 
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
 
BooleanProperty m_suppress
 
BooleanProperty m_inactCount
 
ColorMap m_colMap
 
int m_msgCount [MSG::NUM_LEVELS]
 
std::map< std::string, std::string > m_loggedStreamsName
 
LoggedStreamsMap_t m_loggedStreams
 
std::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::mutex m_thresholdMapMutex
 Mutex to synchronize multiple access to m_thresholdMap (. More...
 
std::vector< std::pair< std::string, std::string > > m_msgLog [MSG::NUM_LEVELS]
 
std::vector< LoggedMessage > m_msgKeyLog
 
bool m_keysUsed
 

Detailed Description

Definition at line 37 of file LoggedMessageSvc.h.

Member Typedef Documentation

◆ ColorMap

typedef std::map<std::string, MSG::Color> LoggedMessageSvc::ColorMap
private

Definition at line 169 of file LoggedMessageSvc.h.

◆ LoggedStreamsMap_t

typedef std::map<std::string, std::ostream*> LoggedMessageSvc::LoggedStreamsMap_t
private

Definition at line 175 of file LoggedMessageSvc.h.

◆ MessageMap

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

Definition at line 43 of file LoggedMessageSvc.h.

◆ NamedStream

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

Definition at line 41 of file LoggedMessageSvc.h.

◆ StreamMap

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

Definition at line 42 of file LoggedMessageSvc.h.

◆ ThresholdMap

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

Definition at line 44 of file LoggedMessageSvc.h.

Constructor & Destructor Documentation

◆ LoggedMessageSvc()

LoggedMessageSvc::LoggedMessageSvc ( const std::string &  name,
ISvcLocator *  svcloc 
)

Definition at line 23 of file LoggedMessageSvc.cxx.

24  : base_class( name, svcloc ), m_keysUsed(false)
25  {
26  m_defaultStream = &std::cout;
27  m_outputLevel = MSG::INFO;
28  declareProperty( "Format", m_defaultFormat = Message::getDefaultFormat() );
29  declareProperty( "timeFormat", m_defaultTimeFormat = Message::getDefaultTimeFormat() );
30  declareProperty( "showStats", m_stats = false );
31  declareProperty( "statLevel", m_statLevel = 0 );
32 
33  // Special properties to control output level of individual sources
34  declareProperty( "setVerbose", m_thresholdProp[MSG::VERBOSE] );
35  declareProperty( "setDebug", m_thresholdProp[MSG::DEBUG] );
36  declareProperty( "setInfo", m_thresholdProp[MSG::INFO] );
37  declareProperty( "setWarning", m_thresholdProp[MSG::WARNING] );
38  declareProperty( "setError", m_thresholdProp[MSG::ERROR] );
39  declareProperty( "setFatal", m_thresholdProp[MSG::FATAL] );
40  declareProperty( "setAlways", m_thresholdProp[MSG::ALWAYS] );
41 
42  declareProperty( "useColors", m_color=false);
43  m_color.declareUpdateHandler(&LoggedMessageSvc::initColors, this);
44 
45  declareProperty( "fatalColorCode", m_logColors[MSG::FATAL] );
46  declareProperty( "errorColorCode", m_logColors[MSG::ERROR] );
47  declareProperty( "warningColorCode", m_logColors[MSG::WARNING] );
48  declareProperty( "infoColorCode", m_logColors[MSG::INFO] );
49  declareProperty( "debugColorCode", m_logColors[MSG::DEBUG] );
50  declareProperty( "verboseColorCode", m_logColors[MSG::VERBOSE] );
51  declareProperty( "alwaysColorCode", m_logColors[MSG::ALWAYS] );
52 
53  const int defaultLimit = 500;
54  declareProperty( "fatalLimit", m_msgLimit[MSG::FATAL] = defaultLimit );
55  declareProperty( "errorLimit", m_msgLimit[MSG::ERROR] = defaultLimit );
56  declareProperty( "warningLimit", m_msgLimit[MSG::WARNING] = defaultLimit );
57  declareProperty( "infoLimit", m_msgLimit[MSG::INFO] = defaultLimit );
58  declareProperty( "debugLimit", m_msgLimit[MSG::DEBUG] = defaultLimit );
59  declareProperty( "verboseLimit", m_msgLimit[MSG::VERBOSE] = defaultLimit );
60  declareProperty( "alwaysLimit", m_msgLimit[MSG::ALWAYS] = 0 );
61 
62  declareProperty( "defaultLimit", m_msgLimit[MSG::NIL] = defaultLimit );
63 
64  declareProperty( "enableSuppression", m_suppress = false );
65  declareProperty( "countInactive", m_inactCount = false )->declareUpdateHandler( &LoggedMessageSvc::setupInactCount, this );
66 #ifndef NDEBUG
67  // initialize the MsgStream static flag.
68  MsgStream::enableCountInactive(m_inactCount);
69 #endif
70 
71  declareProperty( "loggingLevel", m_logLevel = MSG::FATAL, "Message level above which all messages are saved" );
72  m_logLevel.declareUpdateHandler(&LoggedMessageSvc::setupThreshold, this);
73 
74  declareProperty( "keywords", m_keywords, "keywords to scan messages for and save");
75  m_keywords.declareUpdateHandler(&LoggedMessageSvc::setupThreshold, this);
76 
77  declareProperty( "loggedStreams",
79  "MessageStream sources we want to dump into a logfile" );
80 
81  for (int ic=0; ic<MSG::NUM_LEVELS; ++ic) {
82  m_logColors[ic].declareUpdateHandler(&LoggedMessageSvc::setupColors, this);
83  m_msgLimit[ic].declareUpdateHandler(&LoggedMessageSvc::setupLimits, this);
84  m_thresholdProp[ic].declareUpdateHandler(&LoggedMessageSvc::setupThreshold, this);
85  }
86 
87  for (int i=0; i<MSG::NUM_LEVELS; ++i) {
88  m_msgCount[i] = 0;
89  }
90 
91 }

◆ ~LoggedMessageSvc()

LoggedMessageSvc::~LoggedMessageSvc ( )
virtual

Definition at line 95 of file LoggedMessageSvc.cxx.

96 {
97  // closing log-files, if any
100  for ( ; iStream != endStream; ++iStream ) {
101  delete iStream->second;
102  iStream->second = nullptr;
103  }
104 }

Member Function Documentation

◆ ATLAS_NOT_CONST_THREAD_SAFE()

virtual std::ostream* defaultStream LoggedMessageSvc::ATLAS_NOT_CONST_THREAD_SAFE ( ) const
inlineoverridevirtual

Definition at line 98 of file LoggedMessageSvc.h.

98  {
99  std::lock_guard<std::mutex> lock(m_reportMutex);
100  return m_defaultStream;
101  }

◆ colTrans()

std::string LoggedMessageSvc::colTrans ( const std::string &  col,
int  offset 
)
private

Definition at line 477 of file LoggedMessageSvc.cxx.

477  {
478  ColorMap::const_iterator itr = m_colMap.find(col);
479  int icol;
480  if (itr != m_colMap.end()) {
481  icol = offset + itr->second;
482  } else {
483  icol = offset + 8;
484  }
485  std::ostringstream os1;
486 
487  os1 << icol;
488 
489  return os1.str();
490 
491 }

◆ eraseMessage() [1/3]

void LoggedMessageSvc::eraseMessage ( )
overridevirtual

Definition at line 761 of file LoggedMessageSvc.cxx.

762 {
763  std::lock_guard<std::recursive_mutex> lock(m_messageMapMutex);
764 
765  m_messageMap.erase( m_messageMap.begin(), m_messageMap.end() );
766 }

◆ eraseMessage() [2/3]

void LoggedMessageSvc::eraseMessage ( const StatusCode &  code)
overridevirtual

Definition at line 775 of file LoggedMessageSvc.cxx.

776 {
777  std::lock_guard<std::recursive_mutex> lock(m_messageMapMutex);
778 
779  m_messageMap.erase( key );
780 }

◆ eraseMessage() [3/3]

void LoggedMessageSvc::eraseMessage ( const StatusCode &  code,
const Message &  message 
)
overridevirtual

Definition at line 789 of file LoggedMessageSvc.cxx.

790 {
791  std::lock_guard<std::recursive_mutex> lock(m_messageMapMutex);
792 
793  bool changed = true;
794  while( changed ) {
795  changed = false;
796  MessageMap::iterator first = m_messageMap.lower_bound( key );
797  MessageMap::iterator last = m_messageMap.upper_bound( key );
798  while( first != last ) {
799  const Message& message = (*first).second;
800  if ( message == msg ) {
801  m_messageMap.erase( first );
802  changed = true;
803  break;
804  }
805  }
806  }
807 }

◆ eraseStream() [1/4]

void LoggedMessageSvc::eraseStream ( )
overridevirtual

Definition at line 673 of file LoggedMessageSvc.cxx.

674 {
675  m_streamMap.erase( m_streamMap.begin(), m_streamMap.end() );
676 }

◆ eraseStream() [2/4]

void LoggedMessageSvc::eraseStream ( int  message_type)
overridevirtual

Definition at line 685 of file LoggedMessageSvc.cxx.

686 {
687  m_streamMap.erase( message_type );
688 }

◆ eraseStream() [3/4]

void LoggedMessageSvc::eraseStream ( int  message_type,
std::ostream *  stream 
)
overridevirtual

Definition at line 697 of file LoggedMessageSvc.cxx.

697  {
698  if ( nullptr != stream ) {
699  bool changed = true;
700  while( changed ) {
701  changed = false;
702  StreamMap::iterator first = m_streamMap.lower_bound( key );
703  StreamMap::iterator last = m_streamMap.upper_bound( key );
704  while( first != last ) {
705  if ( (*first).second.second == stream ) {
706  m_streamMap.erase( first );
707  changed = true;
708  break;
709  }
710  }
711  }
712  }
713 }

◆ eraseStream() [4/4]

void LoggedMessageSvc::eraseStream ( std::ostream *  stream)
overridevirtual

Definition at line 722 of file LoggedMessageSvc.cxx.

722  {
723  if ( nullptr != stream ) {
724  bool changed = true;
725  while( changed ) {
726  changed = false;
728  while( first != m_streamMap.end() ) {
729  if ( (*first).second.second == stream ) {
730  m_streamMap.erase( first );
731  changed = true;
732  break;
733  }
734  }
735  }
736  }
737 }

◆ finalize()

StatusCode LoggedMessageSvc::finalize ( )
overridevirtual

Finalize Service.

Definition at line 348 of file LoggedMessageSvc.cxx.

348  {
349 
350  m_suppress = false;
351 
352  std::ostringstream os;
353 
354  if (m_stats) {
355  os << "Summarizing all message counts" << endl;
356  } else {
357  os << "Listing sources of suppressed message: " << endl;
358  }
359 
360  os << "=====================================================" << endl;
361  os << " Message Source | Level | Count" << endl;
362  os << "-----------------------------+---------+-------------" << endl;
363 
364 
365  bool found(false);
366 
367  std::lock_guard<std::mutex> lock(m_reportMutex);
368  std::map<std::string,MsgAry>::const_iterator itr;
369  for (itr=m_sourceMap.begin(); itr!=m_sourceMap.end(); ++itr) {
370  for (unsigned int ic = 0; ic < MSG::NUM_LEVELS; ++ic) {
371  if ( (itr->second.msg[ic] >= m_msgLimit[ic] && m_msgLimit[ic] != 0 ) ||
372  (m_stats && itr->second.msg[ic] > 0 && ic >= m_statLevel.value()) ) {
373  os << " ";
374  os.width(28);
375  os.setf(ios_base::left,ios_base::adjustfield);
376  os << itr->first;
377 
378  os << "|";
379 
380  os.width(8);
381  os.setf(ios_base::right,ios_base::adjustfield);
382  os << levelNames[ic];
383 
384  os << " |";
385 
386  os.width(9);
387  os << itr->second.msg[ic];
388 
389  os << endl;
390 
391  found = true;
392  }
393  }
394  }
395  os << "=====================================================" << endl;
396 
397  if (found || m_stats) {
398  cout << os.str();
399  }
400 
401 
402 #ifndef NDEBUG
403  if (m_inactCount.value()) {
404 
405  std::ostringstream os;
406  os << "Listing sources of Unprotected and Unseen messages\n";
407 
408  bool found(false);
409 
410  unsigned int ml(0);
411  std::map<std::string,MsgAry>::const_iterator itr;
412  for (itr=m_inactiveMap.begin(); itr!=m_inactiveMap.end(); ++itr) {
413  for (unsigned int ic = 0; ic < MSG::NUM_LEVELS; ++ic) {
414  if (itr->second.msg[ic] != 0) {
415  if (itr->first.length() > ml) { ml = itr->first.length(); }
416  }
417  }
418  }
419 
420  for (unsigned int i=0; i<ml+25; ++i) {
421  os << "=";
422  }
423 
424  os << endl << " ";
425  os.width(ml+2);
426  os.setf(ios_base::left,ios_base::adjustfield);
427  os << "Message Source";
428  os.width(1);
429  os << "| Level | Count" << endl;
430 
431  for (unsigned int i=0; i<ml+3; ++i) {
432  os << "-";
433  }
434  os << "+---------+-----------" << endl;
435 
436 
437  for (itr=m_inactiveMap.begin(); itr!=m_inactiveMap.end(); ++itr) {
438  for (unsigned int ic = 0; ic < MSG::NUM_LEVELS; ++ic) {
439  if (itr->second.msg[ic] != 0) {
440  os << " ";
441  os.width(ml+2);
442  os.setf(ios_base::left,ios_base::adjustfield);
443  os << itr->first;
444 
445  os << "|";
446 
447  os.width(8);
448  os.setf(ios_base::right,ios_base::adjustfield);
449  os << levelNames[ic];
450 
451  os << " |";
452 
453  os.width(9);
454  os << itr->second.msg[ic];
455 
456  os << endl;
457 
458  found = true;
459  }
460  }
461  }
462  for (unsigned int i=0; i<ml+25; ++i) {
463  os << "=";
464  }
465  os << endl;
466 
467  if (found) {
468  cout << os.str();
469  }
470  }
471 #endif
472 
473  return StatusCode::SUCCESS;
474 }

◆ getKeyMessages()

auto LoggedMessageSvc::getKeyMessages ( ) const
overridevirtual

Definition at line 964 of file LoggedMessageSvc.cxx.

966 {
967  std::lock_guard<std::mutex> lock(m_reportMutex);
968  return m_msgKeyLog;
969 }

◆ getLogColor()

std::string LoggedMessageSvc::getLogColor ( int  logLevel) const
overridevirtual

Definition at line 845 of file LoggedMessageSvc.cxx.

845  {
846 // ---------------------------------------------------------------------------
847  if (logLevel < MSG::NUM_LEVELS) {
848  return m_logColorCodes[logLevel];
849  } else {
850  return "";
851  }
852 }

◆ getMessages()

std::vector< std::pair< std::string, std::string > > LoggedMessageSvc::getMessages ( MSG::Level  level) const
overridevirtual

Definition at line 957 of file LoggedMessageSvc.cxx.

958 {
959  std::lock_guard<std::mutex> lock(m_reportMutex);
960  return m_msgLog[ level ];
961 }

◆ incrInactiveCount()

void LoggedMessageSvc::incrInactiveCount ( MSG::Level  level,
std::string_view  src 
)
overridevirtual

Definition at line 863 of file LoggedMessageSvc.cxx.

863  {
864 
865  auto entry = m_inactiveMap.find( source );
866  if ( entry == m_inactiveMap.end() ) {
867  entry = m_inactiveMap.emplace( source, MsgAry{} ).first;
868  }
869  ++entry->second.msg[level];
870 }

◆ initColors()

void LoggedMessageSvc::initColors ( Gaudi::Details::PropertyBase &  prop)
private

Definition at line 151 of file LoggedMessageSvc.cxx.

151  {
152 
153  if (m_color == true) {
154 
155  if (m_logColors[MSG::FATAL].value().size() == 0) {
156  vector<string> fatDef;
157  fatDef.push_back( "[94;101;1m" );
158  m_logColors[MSG::FATAL].set( fatDef );
159  } else {
161  }
162 
163  if (m_logColors[MSG::ERROR].value().size() == 0) {
164  vector<string> errDef;
165  errDef.push_back( "[97;101;1m" );
166  m_logColors[MSG::ERROR].set( errDef );
167  } else {
169  }
170 
171  if (m_logColors[MSG::WARNING].value().size() == 0) {
172  vector<string> warDef;
173  warDef.push_back( "[93;1m" );
174  m_logColors[MSG::WARNING].set( warDef );
175  } else {
177  }
178 
179  } else {
180 
181  // reset all color codes;
182  for (int ic=0; ic<MSG::NUM_LEVELS; ++ic) {
183  vector<string> def;
184  m_logColors[ic].set( def );
185  }
186 
187  }
188 
189 }

◆ initialize()

StatusCode LoggedMessageSvc::initialize ( )
overridevirtual

Initialize Service.

Definition at line 109 of file LoggedMessageSvc.cxx.

109  {
110  StatusCode sc;
112  if( sc.isFailure() ) return sc;
113  // hack since in Gaudi v30, msgSvc() now returns a const SmartIF<IMessageSvc>
114  // Release pointer to myself done in Service base class
115  SmartIF<IMessageSvc> &si ATLAS_THREAD_SAFE = const_cast<SmartIF<IMessageSvc>&> (msgSvc());
116  si.reset();
117 
118 #ifdef _WIN32
119  m_color = false;
120 #endif
121 
122  m_colMap["black"] = MSG::BLACK;
123  m_colMap["red"] = MSG::RED;
124  m_colMap["green"] = MSG::GREEN;
125  m_colMap["yellow"] = MSG::YELLOW;
126  m_colMap["blue"] = MSG::BLUE;
127  m_colMap["purple"] = MSG::PURPLE;
128  m_colMap["cyan"] = MSG::CYAN;
129  m_colMap["white"] = MSG::WHITE;
130 
131  // make sure the map of logged stream names is initialized
132  setupLogStreams();
133 
134  if (m_keywords.value().size() > 0) {
135  m_keysUsed = true;
136  }
137 
138  return StatusCode::SUCCESS;
139 }

◆ insertMessage()

void LoggedMessageSvc::insertMessage ( const StatusCode &  code,
Message  message 
)
overridevirtual

Definition at line 747 of file LoggedMessageSvc.cxx.

748 {
749  std::lock_guard<std::recursive_mutex> lock(m_messageMapMutex);
750 
751  m_messageMap.emplace( key, std::move( msg ) );
752 }

◆ insertStream()

void LoggedMessageSvc::insertStream ( int  message_type,
std::string  name,
std::ostream *  stream 
)
overridevirtual

Definition at line 658 of file LoggedMessageSvc.cxx.

661 {
662  typedef StreamMap::value_type value_type;
663  m_streamMap.insert( value_type( key, NamedStream( std::move(name), stream) ) );
664 }

◆ messageCount()

int LoggedMessageSvc::messageCount ( MSG::Level  logLevel) const
overridevirtual

Definition at line 855 of file LoggedMessageSvc.cxx.

855  {
856 
857  return m_msgCount[level];
858 
859 }

◆ outputLevel() [1/2]

int LoggedMessageSvc::outputLevel ( ) const
overridevirtual

Definition at line 810 of file LoggedMessageSvc.cxx.

810  {
811 // ---------------------------------------------------------------------------
812  return m_outputLevel;
813 }

◆ outputLevel() [2/2]

int LoggedMessageSvc::outputLevel ( std::string_view  source) const
overridevirtual

Definition at line 815 of file LoggedMessageSvc.cxx.

815  {
816 // ---------------------------------------------------------------------------
817  std::lock_guard<std::mutex> lock(m_thresholdMapMutex);
818 
819  auto it = m_thresholdMap.find( source );
820  return it != m_thresholdMap.end() ? it->second : m_outputLevel.value();
821 }

◆ reinitialize()

StatusCode LoggedMessageSvc::reinitialize ( )
overridevirtual

Reinitialize Service.

Definition at line 144 of file LoggedMessageSvc.cxx.

144  {
145  m_state = Gaudi::StateMachine::OFFLINE;
146  return initialize();
147 }

◆ reportMessage() [1/4]

void LoggedMessageSvc::reportMessage ( const Message &  message)
overridevirtual

Definition at line 597 of file LoggedMessageSvc.cxx.

597  {
598  reportMessage(msg, outputLevel(msg.getSource()));
599 }

◆ reportMessage() [2/4]

void LoggedMessageSvc::reportMessage ( const Message &  msg,
int  outputLevel 
)
overridevirtual

Definition at line 500 of file LoggedMessageSvc.cxx.

500  {
501  std::lock_guard<std::mutex> lock(m_reportMutex);
502 
503  int key = msg.getType();
504  int nmsg;
505 
506  m_msgCount[key] ++;
507 
508  if (outputLevel >= m_logLevel) {
509  m_msgLog[ outputLevel ].push_back( make_pair (msg.getSource(), msg.getMessage() ) );
510  }
511 
512  if (m_keysUsed) {
513  if (msg.getSource() != "AthenaSummarySvc") {
514  for (vector<string>::const_iterator itr=m_keywords.value().begin(); itr!= m_keywords.value().end(); ++itr) {
515  if (msg.getMessage().find( *itr ) != string::npos) {
516  m_msgKeyLog.push_back( LoggedMessage( outputLevel, msg.getSource(), msg.getMessage() ));
517  break;
518  }
519  }
520  }
521  }
522 
523  const Message *cmsg = &msg;
524  std::unique_ptr<Message> suppressed_msg;
525 
526  // processing logged streams
527  if ( !m_loggedStreams.empty() ) {
528  const LoggedStreamsMap_t::iterator iLog = m_loggedStreams.find( msg.getSource() );
529  if ( m_loggedStreams.end() != iLog ) {
530  (*iLog->second) << *cmsg << std::endl;
531  }
532  }
533 
534  if ( m_suppress.value() || m_stats.value() ) {
535 
537  m_sourceMap.find(msg.getSource());
538  if (itr != m_sourceMap.end()) {
539  itr->second.msg[key] += 1;
540  nmsg = itr->second.msg[key];
541  } else {
542  MsgAry A;
543  for (int i=0; i<MSG::NUM_LEVELS; ++i) {
544  A.msg[i] = 0;
545  }
546  A.msg[key] = 1;
547  m_sourceMap[msg.getSource()] = A;
548  nmsg = 1;
549  }
550 
551  if (m_suppress.value()) {
552 
553  if ( m_msgLimit[key] != 0 ) {
554  if (nmsg == m_msgLimit[key]) {
555  std::string str = levelNames[key] + " message limit (";
557  str += ") reached for ";
558  str += msg.getSource() + ". Suppressing further output.";
559  suppressed_msg = std::make_unique<Message>(msg.getSource(),MSG::WARNING,str);
560  suppressed_msg->setFormat(msg.getFormat());
561  cmsg = suppressed_msg.get();
562  } else if (nmsg > m_msgLimit[key]) {
563  return;
564  }
565  }
566  }
567 
568  }
569 
570  StreamMap::const_iterator first = m_streamMap.lower_bound( key );
571  if ( first != m_streamMap.end() ) {
572  StreamMap::const_iterator last = m_streamMap.upper_bound( key );
573  while( first != last ) {
574  std::ostream& stream = *( (*first).second.second );
575  stream << *cmsg << std::endl;
576  ++first;
577  }
578  }
579  else if ( key >= outputLevel ) {
580  msg.setFormat(m_defaultFormat);
581  msg.setTimeFormat(m_defaultTimeFormat);
582  if (!m_color) {
583  (*m_defaultStream) << *cmsg << std::endl << std::flush;
584  } else {
585  (*m_defaultStream) << m_logColorCodes[key] << *cmsg << "\033[m"
586  << std::endl << std::flush;
587  }
588  }
589 }

◆ reportMessage() [3/4]

void LoggedMessageSvc::reportMessage ( const StatusCode &  code,
std::string_view  source = "" 
)
overridevirtual

Definition at line 621 of file LoggedMessageSvc.cxx.

623 {
624  std::lock_guard<std::recursive_mutex> lock(m_messageMapMutex);
625 
626  MessageMap::const_iterator first = m_messageMap.lower_bound( key );
627  if ( first != m_messageMap.end() ) {
628  MessageMap::const_iterator last = m_messageMap.upper_bound( key );
629  while( first != last ) {
630  Message msg = (*first).second;
631  msg.setSource( source );
632  std::ostringstream os1;
633  os1 << "Status Code " << key.getCode() << std::ends;
634  Message stat_code1( std::string{source}, msg.getType(), os1.str() );
635  reportMessage( stat_code1 );
636  reportMessage( msg );
637  ++first;
638  }
639  }
640  else {
641  Message mesg = m_defaultMessage;
642  mesg.setSource( source );
643  std::ostringstream os2;
644  os2 << "Status Code " << key.getCode() << std::ends;
645  Message stat_code2( std::string{source}, mesg.getType(), os2.str() );
646  reportMessage( stat_code2 );
647  reportMessage( mesg );
648  }
649 }

◆ reportMessage() [4/4]

void LoggedMessageSvc::reportMessage ( std::string  source,
int  type,
std::string  message 
)
overridevirtual

Definition at line 607 of file LoggedMessageSvc.cxx.

609  {
610  Message msg( std::move(source), type, std::move(message));
611  reportMessage( msg );
612 }

◆ setDefaultStream()

virtual void LoggedMessageSvc::setDefaultStream ( std::ostream *  stream)
inlineoverridevirtual

Definition at line 104 of file LoggedMessageSvc.h.

104  {
105  std::lock_guard<std::mutex> lock(m_reportMutex);
107  }

◆ setOutputLevel() [1/2]

void LoggedMessageSvc::setOutputLevel ( int  new_level)
overridevirtual

Definition at line 824 of file LoggedMessageSvc.cxx.

824  {
825 // ---------------------------------------------------------------------------
826  m_outputLevel = new_level;
827 }

◆ setOutputLevel() [2/2]

void LoggedMessageSvc::setOutputLevel ( std::string_view  source,
int  new_level 
)
overridevirtual

Definition at line 830 of file LoggedMessageSvc.cxx.

830  {
831 // ---------------------------------------------------------------------------
832  std::lock_guard<std::mutex> lock(m_thresholdMapMutex);
833 
834  // only write if we really have to...
835  auto i = m_thresholdMap.find( source );
836  if ( i == m_thresholdMap.end() ) {
837  m_thresholdMap.emplace( source, level );
838  } else if ( i->second != level ) {
839  i->second = level;
840  }
841 
842 }

◆ setupColors()

void LoggedMessageSvc::setupColors ( Gaudi::Details::PropertyBase &  prop)
private

Definition at line 193 of file LoggedMessageSvc.cxx.

193  {
194 
195  if (! m_color) return;
196 
197  int ic;
198  if (prop.name() == "fatalColorCode") {
199  ic = MSG::FATAL;
200  } else if (prop.name() == "errorColorCode") {
201  ic = MSG::ERROR;
202  } else if (prop.name() == "warningColorCode") {
203  ic = MSG::WARNING;
204  } else if (prop.name() == "infoColorCode") {
205  ic = MSG::INFO;
206  } else if (prop.name() == "debugColorCode") {
207  ic = MSG::DEBUG;
208  } else if (prop.name() == "verboseColorCode") {
209  ic = MSG::VERBOSE;
210  } else if (prop.name() == "alwaysColorCode") {
211  ic = MSG::ALWAYS;
212  } else {
213  cout << "ERROR: Unknown message color parameter: " << prop.name()
214  << endl;
215  return;
216  }
217 
218  string code;
219  vector<string>::const_iterator itr;
220  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)[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  vector<string>::const_iterator itr2 = itr + 1;
234 
235  code = "\033[" + colTrans(*itr, 90) + ";"
236  + colTrans(*itr2, 100) + ";1m";
237 
238  }
239 
240  m_logColorCodes[ic] = std::move(code);
241 
242 }

◆ setupInactCount()

void LoggedMessageSvc::setupInactCount ( Gaudi::Details::PropertyBase &  prop)
private

Definition at line 336 of file LoggedMessageSvc.cxx.

336  {
337  if (prop.name() == "countInactive") {
338 #ifndef NDEBUG
339  BooleanProperty *p = dynamic_cast<BooleanProperty*>(&prop);
340  if (p)
341  MsgStream::enableCountInactive(p->value());
342 #endif
343  }
344 }

◆ setupLimits()

void LoggedMessageSvc::setupLimits ( Gaudi::Details::PropertyBase &  prop)
private

Definition at line 245 of file LoggedMessageSvc.cxx.

245  {
246 
247  //int ic = 0;
248  if (prop.name() == "fatalLimit") {
249  //ic = MSG::FATAL;
250  } else if (prop.name() == "errorLimit") {
251  //ic = MSG::ERROR;
252  } else if (prop.name() == "warningLimit") {
253  //ic = MSG::WARNING;
254  } else if (prop.name() == "infoLimit") {
255  //ic = MSG::INFO;
256  } else if (prop.name() == "debugLimit") {
257  //ic = MSG::DEBUG;
258  } else if (prop.name() == "verboseLimit") {
259  //ic = MSG::VERBOSE;
260  } else if (prop.name() == "alwaysLimit") {
261  IntegerProperty *p = dynamic_cast<IntegerProperty*>(&prop);
262  if (p && p->value() != 0) {
263  cout << "LoggedMessageSvc ERROR: cannot suppress ALWAYS messages" << endl;
264  p->setValue(0);
265  }
266  //ic = MSG::ALWAYS;
267  } else if (prop.name() == "defaultLimit") {
268  for (int i = MSG::VERBOSE; i< MSG::NUM_LEVELS; ++i) {
269  if (i != MSG::ALWAYS) {
270  m_msgLimit[i] = m_msgLimit[MSG::NIL].value();
271  }
272  }
273  } else {
274  cout << "LoggedMessageSvc ERROR: Unknown message limit parameter: "
275  << prop.name() << endl;
276  return;
277  }
278 
279 }

◆ setupLogStreams()

void LoggedMessageSvc::setupLogStreams ( )
private

Definition at line 873 of file LoggedMessageSvc.cxx.

874 {
875  // reset state
876  for ( LoggedStreamsMap_t::iterator iLog = m_loggedStreams.begin();
877  iLog != m_loggedStreams.end();
878  ++iLog ) {
879  delete iLog->second;
880  }
881  m_loggedStreams.clear();
882 
883  typedef std::map<std::string,std::string> StreamMap_t;
884  const StreamMap_t& streamMap = m_loggedStreamsName;
885  typedef StreamMap_t::const_iterator StreamMapIter;
886 
887  for ( StreamMapIter iProp = streamMap.begin(), iEnd = streamMap.end();
888  iProp != iEnd;
889  ++iProp ) {
890 
891  const std::string sourceName = iProp->first;
892  const std::string outFileName = iProp->second;
893 
894  std::set<std::string> outFileNames;
895  for ( StreamMapIter jProp = streamMap.begin();
896  jProp != iEnd;
897  ++jProp ) {
898  if ( jProp->first != iProp->first ) {
899  outFileNames.insert( jProp->second );
900  }
901  }
902 
903  tee( sourceName, outFileName, outFileNames );
904 
905  }//> loop over property entries
906 
907  return;
908 }

◆ setupThreshold()

void LoggedMessageSvc::setupThreshold ( Gaudi::Details::PropertyBase &  prop)
private

Definition at line 282 of file LoggedMessageSvc.cxx.

282  {
283 
284  int ic = 0;
285  if (prop.name() == "setFatal") {
286  ic = MSG::FATAL;
287  } else if (prop.name() == "setError") {
288  ic = MSG::ERROR;
289  } else if (prop.name() == "setWarning") {
290  ic = MSG::WARNING;
291  } else if (prop.name() == "setInfo") {
292  ic = MSG::INFO;
293  } else if (prop.name() == "setDebug") {
294  ic = MSG::DEBUG;
295  } else if (prop.name() == "setVerbose") {
296  ic = MSG::VERBOSE;
297  } else if (prop.name() == "setAlways") {
298  ic = MSG::ALWAYS;
299  } else if (prop.name() == "loggingLevel") {
300  IntegerProperty *iap = dynamic_cast<IntegerProperty*>( &prop );
301  if (iap)
302  m_logLevel = iap->value();
303  return;
304  } else if (prop.name() == "keywords") {
305  StringArrayProperty *sap = dynamic_cast<StringArrayProperty*>( &prop );
306  if (sap!= nullptr && sap->value().size() > 0) {
307  m_keysUsed = true;
308  } else {
309  m_keysUsed = false;
310  }
311  return;
312  } else {
313  cerr << "LoggedMessageSvc ERROR: Unknown message theshold parameter: "
314  << prop.name() << endl;
315  return;
316  }
317 
318  StringArrayProperty *sap = dynamic_cast<StringArrayProperty*>( &prop);
319  if (sap == nullptr) {
320  std::cerr << "could not dcast " << prop.name()
321  << " to a StringArrayProperty (which it should be!)" << endl;
322  return;
323  } else {
324  std::vector<std::string>::const_iterator itr;
325  for ( itr = sap->value().begin();
326  itr != sap->value().end();
327  ++itr) {
328  setOutputLevel( *itr, ic );
329  }
330  }
331 
332 }

◆ tee()

void LoggedMessageSvc::tee ( const std::string &  sourceName,
const std::string &  logFileName,
const std::set< std::string > &  declaredOutFileNames 
)
private

Definition at line 911 of file LoggedMessageSvc.cxx.

914 {
915  const std::ios_base::openmode openMode = std::ios_base::out |
916  std::ios_base::trunc;
917 
919  LoggedStreamsMap_t::iterator iStream = m_loggedStreams.find( sourceName );
920  if ( iStream != iEnd ) {
921  delete iStream->second;
922  iStream->second = nullptr;
923  m_loggedStreams.erase( iStream );
924  }
925 
926  // before creating a new ofstream, make sure there is no already existing
927  // one with the same file name...
928  iEnd = m_loggedStreams.end();
929  for ( iStream = m_loggedStreams.begin(); iStream != iEnd; ++iStream ) {
930  if ( outFileNames.find( outFileName ) != outFileNames.end() ) {
931  m_loggedStreams[sourceName] = m_loggedStreams[iStream->first];
932  return;
933  }
934  }
935 
936  std::ofstream * out = new std::ofstream( outFileName.c_str(), openMode );
937 
938  if ( !out->good() ) {
939  out->close();
940  delete out;
941  return;
942  }
943 
944  m_loggedStreams[sourceName] = out;
945 
946  return;
947 }

◆ useColor()

virtual bool LoggedMessageSvc::useColor ( ) const
inlineoverridevirtual

Definition at line 122 of file LoggedMessageSvc.h.

122 { return m_color; }

Member Data Documentation

◆ m_colMap

ColorMap LoggedMessageSvc::m_colMap
private

Definition at line 170 of file LoggedMessageSvc.h.

◆ m_color

BooleanProperty LoggedMessageSvc::m_color
private

Definition at line 147 of file LoggedMessageSvc.h.

◆ m_defaultFormat

std::string LoggedMessageSvc::m_defaultFormat
private

Default format for the messages.

Definition at line 144 of file LoggedMessageSvc.h.

◆ m_defaultMessage

Message LoggedMessageSvc::m_defaultMessage
private

Default Message.

Definition at line 140 of file LoggedMessageSvc.h.

◆ m_defaultStream

std::ostream* LoggedMessageSvc::m_defaultStream
private

Pointer to the output stream.

Definition at line 139 of file LoggedMessageSvc.h.

◆ m_defaultTimeFormat

std::string LoggedMessageSvc::m_defaultTimeFormat
private

Default format for timestamps in the messages.

Definition at line 145 of file LoggedMessageSvc.h.

◆ m_inactCount

BooleanProperty LoggedMessageSvc::m_inactCount
private

Definition at line 166 of file LoggedMessageSvc.h.

◆ m_inactiveMap

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

Definition at line 165 of file LoggedMessageSvc.h.

◆ m_keysUsed

bool LoggedMessageSvc::m_keysUsed
private

Definition at line 201 of file LoggedMessageSvc.h.

◆ m_keywords

StringArrayProperty LoggedMessageSvc::m_keywords
private

Definition at line 153 of file LoggedMessageSvc.h.

◆ m_logColorCodes

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

Definition at line 155 of file LoggedMessageSvc.h.

◆ m_logColors

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

Definition at line 150 of file LoggedMessageSvc.h.

◆ m_loggedStreams

LoggedStreamsMap_t LoggedMessageSvc::m_loggedStreams
private

Definition at line 176 of file LoggedMessageSvc.h.

◆ m_loggedStreamsName

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

Definition at line 174 of file LoggedMessageSvc.h.

◆ m_logLevel

IntegerProperty LoggedMessageSvc::m_logLevel
private

Definition at line 152 of file LoggedMessageSvc.h.

◆ m_messageMap

MessageMap LoggedMessageSvc::m_messageMap
private

Message map.

Definition at line 142 of file LoggedMessageSvc.h.

◆ m_messageMapMutex

std::recursive_mutex LoggedMessageSvc::m_messageMapMutex
mutableprivate

Mutex to synchronize multiple access to m_messageMap.

Definition at line 193 of file LoggedMessageSvc.h.

◆ m_msgCount

int LoggedMessageSvc::m_msgCount[MSG::NUM_LEVELS]
private

Definition at line 172 of file LoggedMessageSvc.h.

◆ m_msgKeyLog

std::vector< LoggedMessage > LoggedMessageSvc::m_msgKeyLog
private

Definition at line 200 of file LoggedMessageSvc.h.

◆ m_msgLimit

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

Definition at line 151 of file LoggedMessageSvc.h.

◆ m_msgLog

std::vector< std::pair<std::string, std::string> > LoggedMessageSvc::m_msgLog[MSG::NUM_LEVELS]
private

Definition at line 199 of file LoggedMessageSvc.h.

◆ m_reportMutex

std::mutex LoggedMessageSvc::m_reportMutex
mutableprivate

Mutex to synchronize multiple threads printing.

Definition at line 190 of file LoggedMessageSvc.h.

◆ m_sourceMap

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

Definition at line 165 of file LoggedMessageSvc.h.

◆ m_statLevel

UnsignedIntegerProperty LoggedMessageSvc::m_statLevel
private

Definition at line 149 of file LoggedMessageSvc.h.

◆ m_stats

BooleanProperty LoggedMessageSvc::m_stats
private

Definition at line 148 of file LoggedMessageSvc.h.

◆ m_streamMap

StreamMap LoggedMessageSvc::m_streamMap
private

Stream map.

Definition at line 141 of file LoggedMessageSvc.h.

◆ m_suppress

BooleanProperty LoggedMessageSvc::m_suppress
private

Definition at line 166 of file LoggedMessageSvc.h.

◆ m_thresholdMap

ThresholdMap LoggedMessageSvc::m_thresholdMap
private

Output level threshold map.

Definition at line 143 of file LoggedMessageSvc.h.

◆ m_thresholdMapMutex

std::mutex LoggedMessageSvc::m_thresholdMapMutex
mutableprivate

Mutex to synchronize multiple access to m_thresholdMap (.

See also
MsgStream::doOutput).

Definition at line 197 of file LoggedMessageSvc.h.

◆ m_thresholdProp

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

Properties controling.

Definition at line 146 of file LoggedMessageSvc.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
LoggedMessageSvc::m_logColors
StringArrayProperty m_logColors[MSG::NUM_LEVELS]
Definition: LoggedMessageSvc.h:150
LoggedMessageSvc::m_msgKeyLog
std::vector< LoggedMessage > m_msgKeyLog
Definition: LoggedMessageSvc.h:200
python.consts.BLACK
BLACK
Definition: consts.py:3
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:18
FullCPAlgorithmsTest_eljob.flush
flush
Definition: FullCPAlgorithmsTest_eljob.py:194
LoggedMessageSvc::m_colMap
ColorMap m_colMap
Definition: LoggedMessageSvc.h:170
LoggedMessageSvc::m_color
BooleanProperty m_color
Definition: LoggedMessageSvc.h:147
LoggedMessageSvc::m_keysUsed
bool m_keysUsed
Definition: LoggedMessageSvc.h:201
LoggedMessageSvc::m_msgLog
std::vector< std::pair< std::string, std::string > > m_msgLog[MSG::NUM_LEVELS]
Definition: LoggedMessageSvc.h:199
LoggedMessageSvc::m_defaultMessage
Message m_defaultMessage
Default Message.
Definition: LoggedMessageSvc.h:140
initialize
void initialize()
Definition: run_EoverP.cxx:894
python.TrigPSCPythonDbSetup.logLevel
logLevel
If HLT PSK is set on command line read it from DB instead of COOL (ATR-25974)
Definition: TrigPSCPythonDbSetup.py:27
skel.it
it
Definition: skel.GENtoEVGEN.py:407
LoggedMessageSvc::initColors
void initColors(Gaudi::Details::PropertyBase &prop)
Definition: LoggedMessageSvc.cxx:151
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
LoggedMessageSvc::outputLevel
virtual int outputLevel() const override
Definition: LoggedMessageSvc.cxx:810
athena.value
value
Definition: athena.py:124
python.RatesEmulationExample.lock
lock
Definition: RatesEmulationExample.py:148
LoggedMessageSvc::m_loggedStreams
LoggedStreamsMap_t m_loggedStreams
Definition: LoggedMessageSvc.h:176
ReweightUtils.message
message
Definition: ReweightUtils.py:15
LoggedMessageSvc::m_stats
BooleanProperty m_stats
Definition: LoggedMessageSvc.h:148
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
atlasStyleMacro.icol
int icol
Definition: atlasStyleMacro.py:13
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
LoggedMessageSvc::m_inactiveMap
std::map< std::string, MsgAry, std::less<> > m_inactiveMap
Definition: LoggedMessageSvc.h:165
dqt_zlumi_alleff_HIST.A
A
Definition: dqt_zlumi_alleff_HIST.py:110
LoggedMessageSvc::m_thresholdMapMutex
std::mutex m_thresholdMapMutex
Mutex to synchronize multiple access to m_thresholdMap (.
Definition: LoggedMessageSvc.h:197
LoggedMessageSvc::m_msgCount
int m_msgCount[MSG::NUM_LEVELS]
Definition: LoggedMessageSvc.h:172
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
A
histSizes.code
code
Definition: histSizes.py:129
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
LoggedMessageSvc::initialize
virtual StatusCode initialize() override
Initialize Service.
Definition: LoggedMessageSvc.cxx:109
LoggedMessageSvc::setupLogStreams
void setupLogStreams()
Definition: LoggedMessageSvc.cxx:873
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
TrigConf::MSGTC::ALWAYS
@ ALWAYS
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:29
lumiFormat.i
int i
Definition: lumiFormat.py:85
LoggedMessageSvc::m_logLevel
IntegerProperty m_logLevel
Definition: LoggedMessageSvc.h:152
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LoggedMessageSvc::m_messageMapMutex
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
Definition: LoggedMessageSvc.h:193
LoggedMessageSvc::tee
void tee(const std::string &sourceName, const std::string &logFileName, const std::set< std::string > &declaredOutFileNames)
Definition: LoggedMessageSvc.cxx:911
LoggedMessageSvc::m_msgLimit
IntegerProperty m_msgLimit[MSG::NUM_LEVELS]
Definition: LoggedMessageSvc.h:151
LoggedMessageSvc::m_suppress
BooleanProperty m_suppress
Definition: LoggedMessageSvc.h:166
LoggedMessageSvc::colTrans
std::string colTrans(const std::string &, int)
Definition: LoggedMessageSvc.cxx:477
LoggedMessageSvc::NamedStream
std::pair< std::string, std::ostream * > NamedStream
Definition: LoggedMessageSvc.h:41
LoggedMessageSvc::m_inactCount
BooleanProperty m_inactCount
Definition: LoggedMessageSvc.h:166
LoggedMessageSvc::m_sourceMap
std::map< std::string, MsgAry, std::less<> > m_sourceMap
Definition: LoggedMessageSvc.h:165
LoggedMessageSvc::setOutputLevel
virtual void setOutputLevel(int new_level) override
Definition: LoggedMessageSvc.cxx:824
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
python.CaloComputeNoiseConfig.defaultLimit
defaultLimit
Definition: CaloComputeNoiseConfig.py:146
grepfile.ic
int ic
Definition: grepfile.py:33
LoggedMessageSvc::m_thresholdMap
ThresholdMap m_thresholdMap
Output level threshold map.
Definition: LoggedMessageSvc.h:143
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
LoggedMessageSvc::m_loggedStreamsName
std::map< std::string, std::string > m_loggedStreamsName
Definition: LoggedMessageSvc.h:174
ReadFromCoolCompare.os2
os2
Definition: ReadFromCoolCompare.py:249
TrigConf::MSGTC::NUM_LEVELS
@ NUM_LEVELS
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:30
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
dumpNswErrorDb.outFileName
string outFileName
Definition: dumpNswErrorDb.py:131
checkTriggerxAOD.found
found
Definition: checkTriggerxAOD.py:328
python.consts.RED
RED
Definition: consts.py:3
LoggedMessageSvc::setupThreshold
void setupThreshold(Gaudi::Details::PropertyBase &prop)
Definition: LoggedMessageSvc.cxx:282
LoggedMessageSvc::m_defaultTimeFormat
std::string m_defaultTimeFormat
Default format for timestamps in the messages.
Definition: LoggedMessageSvc.h:145
python.consts.YELLOW
YELLOW
Definition: consts.py:3
python.consts.GREEN
GREEN
Definition: consts.py:3
LoggedMessageSvc::m_thresholdProp
StringArrayProperty m_thresholdProp[MSG::NUM_LEVELS]
Properties controling.
Definition: LoggedMessageSvc.h:146
LoggedMessageSvc::setupLimits
void setupLimits(Gaudi::Details::PropertyBase &prop)
Definition: LoggedMessageSvc.cxx:245
python.Constants.INFO
int INFO
Definition: Control/AthenaCommon/python/Constants.py:15
LoggedMessageSvc::m_reportMutex
std::mutex m_reportMutex
Mutex to synchronize multiple threads printing.
Definition: LoggedMessageSvc.h:190
DeMoScan.first
bool first
Definition: DeMoScan.py:534
DEBUG
#define DEBUG
Definition: page_access.h:11
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
LoggedMessageSvc::m_defaultStream
std::ostream * m_defaultStream
Pointer to the output stream.
Definition: LoggedMessageSvc.h:139
LoggedMessageSvc::reportMessage
virtual void reportMessage(const Message &message) override
Definition: LoggedMessageSvc.cxx:597
copySelective.source
string source
Definition: copySelective.py:31
str
Definition: BTagTrackIpAccessor.cxx:11
LoggedMessageSvc::m_logColorCodes
std::string m_logColorCodes[MSG::NUM_LEVELS]
Definition: LoggedMessageSvc.h:155
LoggedMessageSvc::m_keywords
StringArrayProperty m_keywords
Definition: LoggedMessageSvc.h:153
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
TrigConf::MSGTC::NIL
@ NIL
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:22
LoggedMessageSvc::m_streamMap
StreamMap m_streamMap
Stream map.
Definition: LoggedMessageSvc.h:141
value_type
Definition: EDM_MasterSearch.h:11
LoggedMessageSvc::setupInactCount
void setupInactCount(Gaudi::Details::PropertyBase &prop)
Definition: LoggedMessageSvc.cxx:336
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
LoggedMessageSvc::m_statLevel
UnsignedIntegerProperty m_statLevel
Definition: LoggedMessageSvc.h:149
python.consts.WHITE
WHITE
Definition: consts.py:3
LoggedMessageSvc::setupColors
void setupColors(Gaudi::Details::PropertyBase &prop)
Definition: LoggedMessageSvc.cxx:193
run.Message
Message
Definition: run.py:57
LoggedMessageSvc::m_messageMap
MessageMap m_messageMap
Message map.
Definition: LoggedMessageSvc.h:142
python.logger.BLUE
BLUE
Definition: logger.py:15
LoggedMessageSvc::m_defaultFormat
std::string m_defaultFormat
Default format for the messages.
Definition: LoggedMessageSvc.h:144
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37