16 constexpr
int depth = 30;
17 constexpr
int offset = 5;
101 auto loc = ident.
find(
" " );
104 for (
auto attrib : Parser( ident.
substr( loc + 1 ) ) ) {
107 if ( attrib.tag ==
"DEBUG" ) {
109 }
else if ( attrib.tag ==
"INFO" ) {
111 }
else if ( attrib.tag ==
"WARNING" ) {
113 }
else if ( attrib.tag ==
"RECOVERABLE" ) {
115 }
else if ( attrib.tag ==
"ERROR" ) {
117 }
else if ( attrib.tag ==
"FATAL" ) {
120 error() <<
"Unknown output level \"" << attrib.tag <<
"\"" <<
endmsg;
124 if (
m_log[level] ) {
129 if ( attrib.value ==
"MsgSvc" ) {
131 }
else if ( attrib.value ==
"STDERR" ) {
133 }
else if ( attrib.value ==
"STDOUT" ) {
140 error() <<
"Unable to open file \"" << attrib.value <<
"\" for writing issues at level " << attrib.tag
155 std::string msg = s_levelTrans.at( lev ) +
" " + org +
" \"" + str +
"\"";
157 if ( lev >=
m_traceLevel ) msg +=
"\n" + getTraceBack();
172 error() <<
"Could not convert " << prop.
name() <<
"to a Gaudi::Property<std::string> (which it should be!)" 179 if ( s_levelSTrans.find( val ) == s_levelSTrans.end() ) {
181 error() <<
"Option " << prop.
name() <<
": unknown Issue Severity level \"" << val <<
"\". Setting it " 182 << s_levelTrans.
at( def ) <<
endmsg;
184 key = s_levelSTrans.at( val );
188 if ( prop.
name() ==
"ReportLevel" ) {
190 }
else if ( prop.
name() ==
"TracebackLevel" ) {
193 error() <<
"setting up unknown property \"" << prop.
name() <<
"\"" <<
endmsg;
204 error() <<
"Could not convert " << prop.
name()
205 <<
"to a Gaudi::Property<std::vector<std::string>> (which it should be!)" <<
endmsg;
208 for (
const auto&
s : sap->
value() ) {
224 debug() <<
"Writing " << s_levelTrans.at( j ) <<
" issues to " <<
m_log[j].name() <<
endmsg;
Parse attribute strings allowing iteration over the various attributes.
StatusCode initialize() override
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
StatusCode connect(const std::string &)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
StatusCode finalize() override
Implementation of property with value of concrete type.
std::string getOrigin() const
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
void setupStreams(Gaudi::Details::PropertyBase &prop)
StatusCode finalize() override
void toupper(std::string &s)
const std::string name() const
property name
bool isSuccess() const
Test for a status code of SUCCESS.
void setupLevels(Gaudi::Details::PropertyBase &prop)
static Time current()
Returns the current time.
IssueSeverity::Level m_reportLevel
bool isFailure() const
Test for a status code of FAILURE.
GAUDI_API int backTrace(void **addresses, const int depth)
MsgStream & err() const
shortcut for the method msgStream(MSG::ERROR)
#define DECLARE_COMPONENT(type)
void setupDefaultLogger()
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
This class is used for returning status codes from appropriate routines.
Gaudi::Property< bool > m_showTime
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
StatusCode reinitialize() override
std::array< logger_t, IssueSeverity::NUM_LEVELS > m_log
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
StatusCode initialize() override
Gaudi::Property< std::vector< std::string > > m_outputfile
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
void WriteToMsgSvc(const std::string &str)
const ValueType & value() const
Backward compatibility (.
Gaudi::Property< std::string > m_traceLevelS
IssueSeverity::Level m_traceLevel
IssueSeverity::Level getLevel() const
void WriteToStream(const std::string &str)
std::string getMsg() const
void report(IssueSeverity::Level level, const std::string &msg, const std::string &origin) override
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Gaudi::Property< std::string > m_reportLevelS
std::string format(bool local, std::string spec="%c") const
Format the time using strftime.
IssueLogger(const std::string &name, ISvcLocator *svc)