1 #ifndef GAUDI_MESSAGESVC_H 2 #define GAUDI_MESSAGESVC_H 138 {
this,
"setVerbose"},
141 {
this,
"setWarning"},
144 {
this,
"setAlways"}}};
149 {
this,
"verboseColorCode"},
150 {
this,
"debugColorCode"},
151 {
this,
"infoColorCode"},
152 {
this,
"warningColorCode"},
153 {
this,
"errorColorCode"},
154 {
this,
"fatalColorCode"},
155 {
this,
"alwaysColorCode"}}};
158 {
this,
"verboseLimit", 500},
159 {
this,
"debugLimit", 500},
160 {
this,
"infoLimit", 500},
161 {
this,
"warningLimit", 500},
162 {
this,
"errorLimit", 500},
163 {
this,
"fatalLimit", 500},
164 {
this,
"alwaysLimit", 0}}};
171 "tracedInactiveSources",
173 "for each message source specified, print a stack trace for the unprotected and unseen messages"};
176 this,
"loggedStreams", {},
"MessageStream sources we want to dump into a logfile"};
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
bool useColor() const override
std::ostream * m_defaultStream
Pointer to the output stream.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
const std::string & name() const override
Retrieve name of the service.
StreamMap m_streamMap
Stream map.
std::multimap< StatusCode, Message > MessageMap
Implementation of property with value of concrete type.
std::string getLogColor(int logLevel) const override
virtual void i_reportMessage(const Message &msg, int outputLevel)
Internal implementation of reportMessage(const Message&,int) without lock.
void setupInactCount(Gaudi::Details::PropertyBase &prop)
std::map< std::string, MsgAry > m_sourceMap
Message m_defaultMessage
Default Message.
std::map< std::string, MsgAry > m_inactiveMap
MessageMap m_messageMap
Message map.
Gaudi::Property< std::string > m_defaultTimeFormat
MessageSvc(const std::string &name, ISvcLocator *svcloc)
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
StatusCode reinitialize() override
Reinitialize Service.
void eraseMessage() override
Gaudi::Property< std::vector< std::string > > m_tracedInactiveSources
void setupColors(Gaudi::Details::PropertyBase &prop)
void eraseStream() override
void incrInactiveCount(MSG::Level level, const std::string &src) override
std::map< std::string, std::shared_ptr< std::ostream > > m_loggedStreams
Private helper class to keep the count of messages of a type (MSG::LEVEL).
Gaudi::Property< bool > m_inactCount
std::array< Gaudi::Property< std::vector< std::string > >, MSG::NUM_LEVELS > m_logColors
Gaudi::Property< unsigned int > m_statLevel
void setOutputLevel(int new_level) override
StatusCode initialize() override
Initialize Service.
ThresholdMap m_thresholdMap
Output level threshold map.
static const std::string getDefaultTimeFormat()
Get the default time format string.
std::multimap< int, NamedStream > StreamMap
This class is used for returning status codes from appropriate routines.
std::pair< std::string, std::ostream * > NamedStream
static const std::string getDefaultFormat()
Get the default format string.
void reportMessage(const Message &message) override
Gaudi::Property< bool > m_color
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Gaudi::Property< std::string > m_defaultFormat
std::recursive_mutex m_reportMutex
Mutex to synchronize multiple threads printing.
MsgAry()=default
Default constructor.
std::ostream * defaultStream() const override
StatusCode finalize() override
Finalize Service.
Base class used to extend a class implementing other interfaces.
int outputLevel() const override
void setupLimits(Gaudi::Details::PropertyBase &prop)
void setupThreshold(Gaudi::Details::PropertyBase &prop)
std::string m_logColorCodes[MSG::NUM_LEVELS]
Gaudi::Property< bool > m_stats
std::array< int, MSG::NUM_LEVELS > m_msgCount
std::array< Gaudi::Property< std::vector< std::string > >, MSG::NUM_LEVELS > m_thresholdProp
std::array< Gaudi::Property< int >, MSG::NUM_LEVELS > m_msgLimit
void tee(const std::string &sourceName, const std::string &logFileName, const std::set< std::string > &declaredOutFileNames)
Gaudi::Property< bool > m_suppress
void insertMessage(const StatusCode &code, const Message &message) override
Gaudi::Property< std::map< std::string, std::string > > m_loggedStreamsName
void insertStream(int message_type, const std::string &name, std::ostream *stream) override
void setDefaultStream(std::ostream *stream) override
int messageCount(MSG::Level logLevel) const override
std::map< std::string, int > ThresholdMap
std::recursive_mutex m_thresholdMapMutex
Mutex to synchronize multiple access to m_thresholdMap (.