Go to the documentation of this file.
11 #ifndef GAUDI_MESSAGESVC_H
12 #define GAUDI_MESSAGESVC_H
109 int outputLevel( std::string_view source )
const override;
115 void setOutputLevel( std::string_view source,
int new_level )
override;
143 {
this,
"setVerbose"},
146 {
this,
"setWarning"},
149 {
this,
"setAlways"}}};
154 {
this,
"verboseColorCode"},
155 {
this,
"debugColorCode"},
156 {
this,
"infoColorCode"},
157 {
this,
"warningColorCode"},
158 {
this,
"errorColorCode"},
159 {
this,
"fatalColorCode"},
160 {
this,
"alwaysColorCode"}}};
163 {
this,
"verboseLimit", 500},
164 {
this,
"debugLimit", 500},
165 {
this,
"infoLimit", 500},
166 {
this,
"warningLimit", 500},
167 {
this,
"errorLimit", 500},
168 {
this,
"fatalLimit", 500},
169 {
this,
"alwaysLimit", 0}}};
176 "tracedInactiveSources",
178 "for each message source specified, print a stack trace for the unprotected and unseen messages"};
181 this,
"loggedStreams", {},
"MessageStream sources we want to dump into a logfile"};
MsgAry()=default
Default constructor.
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
StatusCode reinitialize() override
Reinitialize Service.
std::array< Gaudi::Property< std::vector< std::string > >, MSG::NUM_LEVELS > m_logColors
void setupLimits(Gaudi::Details::PropertyBase &prop)
Gaudi::Property< bool > m_stats
std::array< int, MSG::NUM_LEVELS > msg
Internal array of counters.
Private helper class to keep the count of messages of a type (MSG::LEVEL).
Gaudi::Property< std::string > m_defaultTimeFormat
void insertMessage(const StatusCode &code, Message message) override
void incrInactiveCount(MSG::Level level, std::string_view src) override
void reportMessage(const Message &message) override
std::string m_logColorCodes[MSG::NUM_LEVELS]
std::recursive_mutex m_reportMutex
Mutex to synchronize multiple threads printing.
virtual void i_reportMessage(const Message &msg, int outputLevel)
Internal implementation of reportMessage(const Message&,int) without lock.
int messageCount(MSG::Level logLevel) const override
StreamMap m_streamMap
Stream map.
std::recursive_mutex m_thresholdMapMutex
Mutex to synchronize multiple access to m_thresholdMap (.
static const std::string getDefaultFormat()
Get the default format string.
std::array< Gaudi::Property< int >, MSG::NUM_LEVELS > m_msgLimit
Gaudi::Property< unsigned int > m_statLevel
const std::string & name() const override
Retrieve name of the service
std::map< std::string, int, std::less<> > ThresholdMap
std::multimap< StatusCode, Message > MessageMap
std::map< std::string, MsgAry, std::less<> > m_sourceMap
std::array< int, MSG::NUM_LEVELS > m_msgCount
Message m_defaultMessage
Default Message.
ThresholdMap m_thresholdMap
Output level threshold map.
Base class used to extend a class implementing other interfaces.
std::ostream * m_defaultStream
Pointer to the output stream.
std::ostream * defaultStream() const override
MessageMap m_messageMap
Message map.
void setupThreshold(Gaudi::Details::PropertyBase &prop)
Gaudi::Property< std::vector< std::string > > m_tracedInactiveSources
std::map< std::string, MsgAry, std::less<> > m_inactiveMap
void setDefaultStream(std::ostream *stream) override
int outputLevel() const override
StatusCode finalize() override
Finalize Service.
Gaudi::Property< bool > m_inactCount
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
std::pair< std::string, std::ostream * > NamedStream
Gaudi::Property< std::map< std::string, std::string, std::less<> > > m_loggedStreamsName
void setupInactCount(Gaudi::Details::PropertyBase &prop)
void eraseMessage() override
Gaudi::Property< bool > m_color
std::map< std::string, std::shared_ptr< std::ostream >, std::less<> > m_loggedStreams
StatusCode initialize() override
Initialize Service.
std::string getLogColor(int logLevel) const override
void eraseStream() override
std::array< Gaudi::Property< std::vector< std::string > >, MSG::NUM_LEVELS > m_thresholdProp
MessageSvc(const std::string &name, ISvcLocator *svcloc)
Gaudi::Property< bool > m_suppress
std::multimap< int, NamedStream > StreamMap
void insertStream(int message_type, std::string name, std::ostream *stream) override
bool useColor() const override
Gaudi::Property< std::string > m_defaultFormat
void setOutputLevel(int new_level) override
void setupColors(Gaudi::Details::PropertyBase &prop)
static const std::string getDefaultTimeFormat()
Get the default time format string.