|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef ATHENASERVICES_LOGGEDMESSAGESVC_H
6 #define ATHENASERVICES_LOGGEDMESSAGESVC_H 1
16 #include "GaudiKernel/StatusCode.h"
17 #include "GaudiKernel/Service.h"
18 #include "GaudiKernel/IMessageSvc.h"
19 #include "GaudiKernel/Message.h"
20 #include "Gaudi/Property.h"
38 public extends<AthService, ILoggedMessageSvc, IInactiveMessageCounter> {
42 typedef std::multimap< int, NamedStream >
StreamMap;
89 virtual void eraseStream(
int message_type )
override;
131 std::string_view
src )
override;
159 std::array<int, MSG::NUM_LEVELS>
msg = {{0}};
167 std::string
colTrans(
const std::string&,
int);
168 typedef std::map<std::string, MSG::Color>
ColorMap;
177 void initColors(Gaudi::Details::PropertyBase& prop);
178 void setupColors(Gaudi::Details::PropertyBase& prop);
179 void setupLimits(Gaudi::Details::PropertyBase& prop);
185 void tee(
const std::string& sourceName,
const std::string& logFileName,
186 const std::set<std::string>& declaredOutFileNames );
StringArrayProperty m_logColors[MSG::NUM_LEVELS]
virtual void insertStream(int message_type, std::string name, std::ostream *stream) override
std::vector< LoggedMessage > m_msgKeyLog
std::map< std::string, std::ostream * > LoggedStreamsMap_t
virtual bool useColor() const override
std::array< int, MSG::NUM_LEVELS > msg
Internal array of counters.
virtual StatusCode finalize() override
Finalize Service.
virtual void insertMessage(const StatusCode &code, Message message) override
std::vector< std::pair< std::string, std::string > > m_msgLog[MSG::NUM_LEVELS]
Message m_defaultMessage
Default Message.
logLevel
If HLT PSK is set on command line read it from DB instead of COOL (ATR-25974)
void initColors(Gaudi::Details::PropertyBase &prop)
virtual int outputLevel() const override
std::map< std::string, MSG::Color > ColorMap
virtual void incrInactiveCount(MSG::Level level, std::string_view src) override
LoggedStreamsMap_t m_loggedStreams
Private helper class to keep the count of messages of a type (MSG::LEVEL).
std::map< std::string, int, std::less<> > ThresholdMap
virtual void setDefaultStream(std::ostream *stream) override
std::map< std::string, MsgAry, std::less<> > m_inactiveMap
virtual StatusCode reinitialize() override
Reinitialize Service.
std::mutex m_thresholdMapMutex
Mutex to synchronize multiple access to m_thresholdMap (.
int m_msgCount[MSG::NUM_LEVELS]
virtual StatusCode initialize() override
Initialize Service.
virtual int messageCount(MSG::Level logLevel) const override
LoggedMessageSvc(const std::string &name, ISvcLocator *svcloc)
IntegerProperty m_logLevel
::StatusCode StatusCode
StatusCode definition for legacy code.
std::recursive_mutex m_messageMapMutex
Mutex to synchronize multiple access to m_messageMap.
void tee(const std::string &sourceName, const std::string &logFileName, const std::set< std::string > &declaredOutFileNames)
IntegerProperty m_msgLimit[MSG::NUM_LEVELS]
BooleanProperty m_suppress
std::string colTrans(const std::string &, int)
virtual void eraseStream() override
std::pair< std::string, std::ostream * > NamedStream
BooleanProperty m_inactCount
virtual const std::vector< LoggedMessage > & getKeyMessages() const override
std::map< std::string, MsgAry, std::less<> > m_sourceMap
virtual void setOutputLevel(int new_level) override
std::multimap< int, NamedStream > StreamMap
ThresholdMap m_thresholdMap
Output level threshold map.
std::map< std::string, std::string > m_loggedStreamsName
virtual const std::vector< std::pair< std::string, std::string > > & getMessages(MSG::Level level) const override
virtual std::ostream *defaultStream ATLAS_NOT_CONST_THREAD_SAFE() const override
virtual std::string getLogColor(int logLevel) const override
void setupThreshold(Gaudi::Details::PropertyBase &prop)
std::string m_defaultTimeFormat
Default format for timestamps in the messages.
StringArrayProperty m_thresholdProp[MSG::NUM_LEVELS]
Properties controling.
void setupLimits(Gaudi::Details::PropertyBase &prop)
MsgAry()=default
Default constructor.
std::mutex m_reportMutex
Mutex to synchronize multiple threads printing.
std::ostream * m_defaultStream
Pointer to the output stream.
virtual void reportMessage(const Message &message) override
std::string m_logColorCodes[MSG::NUM_LEVELS]
StringArrayProperty m_keywords
std::multimap< StatusCode, Message > MessageMap
StreamMap m_streamMap
Stream map.
virtual ~LoggedMessageSvc()
Define macros for attributes used to control the static checker.
void setupInactCount(Gaudi::Details::PropertyBase &prop)
UnsignedIntegerProperty m_statLevel
void setupColors(Gaudi::Details::PropertyBase &prop)
MessageMap m_messageMap
Message map.
std::string m_defaultFormat
Default format for the messages.
virtual void eraseMessage() override