14 constexpr
int depth = 30;
15 constexpr
int offset = 5;
126 auto loc = ident.
find(
" ");
129 for (
auto attrib: Parser(ident.
substr(loc + 1))) {
139 error() <<
"Unknown output level \"" << attrib.tag <<
"\""
149 if (attrib.value ==
"MsgSvc") {
151 }
else if (attrib.value ==
"STDERR") {
153 }
else if (attrib.value ==
"STDOUT") {
161 error() <<
"Unable to open file \"" << attrib.value
162 <<
"\" for writing issues at level " << attrib.tag <<
endmsg;
166 debug() <<
"Writing " << s_levelTrans.at(level)
178 std::string msg = s_levelTrans.at(lev) +
" " + org +
" \"" + str +
"\"";
198 error() <<
"Could not convert " << prop.
name()
199 <<
"to a StringProperty (which it should be!)" <<
endmsg;
205 if (s_levelSTrans.find(val) == s_levelSTrans.end()) {
207 error() <<
"Option " << prop.
name() <<
": unknown Issue Severity level \""
208 << val <<
"\". Setting it " << s_levelTrans.
at(def) <<
endmsg;
210 key = s_levelSTrans.at(val);
214 if (prop.
name() ==
"ReportLevel") {
216 }
else if (prop.
name() ==
"TracebackLevel") {
219 error() <<
"setting up unknown property \""
231 error() <<
"Could not convert " << prop.
name()
232 <<
"to a StringArrayProperty (which it should be!)" <<
endmsg;
235 for (
const auto&
s : sap->
value() ) {
251 debug() <<
"Writing " << s_levelTrans.at(j)
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
std::string getOrigin() const
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
virtual Property & declareUpdateHandler(std::function< void(Property &)> fun)
set new callback for update
const std::string & name() const
property name
StatusCode finalize() override
void toupper(std::string &s)
static Time current(void)
Returns the current time.
bool isSuccess() const
Test for a status code of SUCCESS.
StringArrayProperty m_outputfile
IssueSeverity::Level m_reportLevel
bool isFailure() const
Test for a status code of FAILURE.
StringProperty m_reportLevelS
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.
StatusCode reinitialize() override
const TYPE & value() const
explicit conversion
std::array< logger_t, IssueSeverity::NUM_LEVELS > m_log
Property base class allowing Property* collections to be "homogeneous".
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
void setupStreams(Property &prop)
void setupLevels(Property &prop)
StatusCode initialize() override
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
void WriteToMsgSvc(const std::string &str)
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
IssueSeverity::Level m_traceLevel
BooleanProperty m_showTime
IssueSeverity::Level getLevel() const
StringProperty m_traceLevelS
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.
std::string format(bool local, std::string spec="%c") const
Format the time using strftime.
IssueLogger(const std::string &name, ISvcLocator *svc)