41 constexpr static std::array<const char *, numLevels>
sTag{
42 {
"{unset-error-level please report}",
"FATAL",
"Error",
"Warning",
"Info",
"Debug"}};
44 std::stringstream
strm;
45 auto channel =
entry.fChannel;
46 if (channel && !channel->GetName().empty())
47 strm <<
'[' << channel->GetName() <<
"] ";
50 if (!
entry.fLocation.fFile.empty())
51 strm <<
" " <<
entry.fLocation.fFile <<
':' <<
entry.fLocation.fLine;
52 if (!
entry.fLocation.fFuncName.empty())
53 strm <<
" in " <<
entry.fLocation.fFuncName;
57 entry.fMessage.c_str());
71 return handlerPtr.get() == handler;
74 std::unique_ptr<RLogHandler>
ret;
84 auto channel =
entry.fChannel;
88 channel->Increment(
entry.fLevel);
92 if (channel->GetEffectiveVerbosity(*
this) <
entry.fLevel)
97 std::vector<RLogHandler *> handlers;
100 std::lock_guard<std::mutex> lock(
fMutex);
104 [](
const std::unique_ptr<RLogHandler> &
handlerUPtr) { return handlerUPtr.get(); });
107 for (
auto &&handler : handlers)
108 if (!handler->Emit(
entry))
static Roo_reg_AGKInteg1D instance
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
ErrorHandlerFunc_t GetErrorHandler()
Returns the current error handler function.
void Increment(ELogLevel severity)
Increase warning or error count.
A diagnostic that can be emitted by the RLogManager.
Abstract RLogHandler base class.
A RLogHandler that multiplexes diagnostics to different client RLogHandlers and keeps track of the su...
std::list< std::unique_ptr< RLogHandler > > fHandlers
std::unique_ptr< RLogHandler > Remove(RLogHandler *handler)
Remove and return the given log handler. Returns nullptr if not found.
static RLogManager & Get()
bool Emit(const RLogEntry &entry) override
Emit a log entry.
void swap(RHist< DIMENSIONS, PRECISION, STAT... > &a, RHist< DIMENSIONS, PRECISION, STAT... > &b) noexcept
Swap two histograms.
@ kInfo
Informational messages; used for instance for tracing.
@ kDebug
Debug information; only useful for developers; can have added verbosity up to 255-kDebug.
@ kFatal
An error which causes further processing to be unreliable.
@ kWarning
Warnings about likely unexpected behavior.