|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "GaudiKernel/MsgStream.h"
16 #include "GaudiKernel/INamedInterface.h"
41 const std::string
p = pkg.substr(0, pkg.find(
'-'));
44 std::string::size_type ipos =
file.find(
"/"+
p+
"/");
45 if (ipos != std::string::npos) {
46 return file.substr(ipos+1, std::string::npos);
69 const std::string& context,
77 *
this <<
": code " <<
sc;
99 const std::string& context)
129 *
this <<
"FILE:LINE";
131 if (pkg && pkg[0] !=
'\0')
141 if (func && func[0] !=
'\0') {
179 std::string tmp1 =
stream().str();
180 std::string
tmp2 = tmp1.substr(0,
m_pos);
185 return MsgStream::doOutput();
232 return context->name();
singleton-like access to IMessageSvc via open function and helper
~ReportMessage()
Destructor.
void format_common(MSG::Level level, int line, const char *file, const char *func, const char *pkg)
Generate the common header for messages.
std::string munge_filename(const std::string &file, const std::string &pkg)
Shorten filename.
static std::atomic< bool > s_hide_error_locus
If true, hide the source file and line number in output messages.
std::string context_name(const INamedInterface *context)
Return the context name from a context (this) pointer.
static std::atomic< bool > s_hide_function_names
If true, hide the function names in output messages.
IMessageSvc * getMessageSvc(bool quiet=false)
virtual MsgStream & doOutput()
Emit the message.
Some weak symbol referencing magic...
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string::size_type m_pos
The position in the output message after the standard header.
static void hideFunctionNames(bool flag=true)
If set to true, hide function names in the output.
static void hideErrorLocus(bool flag=true)
If set to true, hide the source file and line number in the output.
Helpers for checking error return status codes and reporting errors.
ReportMessage(MSG::Level level, int line, const char *file, const char *func, const char *pkg, const std::string &context, StatusCode sc)
Constructor.
Normalize a pretty-printed C++ function name,.
std::string normalizeFunctionName(const std::string &fname)
Normalize a pretty-printed C++ function name.