26namespace Experimental {
65 std::vector<std::unique_ptr<TLogHandler>>
fHandlers;
80 void PushBack(std::unique_ptr<TLogHandler> handler) {
fHandlers.emplace_back(std::move(handler)); }
87 if (!handler->Emit(entry))
173#define R__LOG_PRETTY_FUNCTION __FUNCSIG__
175#define R__LOG_PRETTY_FUNCTION __PRETTY_FUNCTION__
178#define R__LOG_HERE(LEVEL, GROUP) \
179 ROOT::Experimental::TLogEntry(LEVEL, GROUP).SetFile(__FILE__).SetLine(__LINE__).SetFunction(R__LOG_PRETTY_FUNCTION)
181#define R__FATAL_HERE(GROUP) R__LOG_HERE(ROOT::Experimental::ELogLevel::kFatal, GROUP)
182#define R__ERROR_HERE(GROUP) R__LOG_HERE(ROOT::Experimental::ELogLevel::kError, GROUP)
183#define R__WARNING_HERE(GROUP) R__LOG_HERE(ROOT::Experimental::ELogLevel::kWarning, GROUP)
184#define R__INFO_HERE(GROUP) R__LOG_HERE(ROOT::Experimental::ELogLevel::kInfo, GROUP)
185#define R__DEBUG_HERE(GROUP) R__LOG_HERE(ROOT::Experimental::ELogLevel::kDebug, GROUP)
Object to count the number of warnings and errors emitted by a section of code, after construction of...
long long GetAccumulatedWarnings() const
Get the number of warnings that the TLogManager has emitted since construction of *this.
long long fInitialErrors
The number of the TLogManager's emitted errors at construction time.
bool HasErrorOrWarningOccurred() const
Whether the TLogManager has emitted an error or a warning since construction time of *this.
bool HasWarningOccurred() const
Whether the TLogManager has emitted a warnings since construction time of *this.
long long GetAccumulatedErrors() const
Get the number of errors that the TLogManager has emitted since construction of *this.
long long fInitialWarnings
The number of the TLogManager's emitted warnings at construction time of *this.
bool HasErrorOccurred() const
Whether the TLogManager has emitted an error since construction time of *this.
A diagnostic, emitted by the TLogManager upon destruction of the TLogEntry.
TLogEntry(ELogLevel level, std::string_view group, std::string_view filename, int line, std::string_view funcname)
TLogEntry & SetFunction(const std::string &func)
TLogEntry & SetLine(int line)
TLogEntry(ELogLevel level, std::string_view group)
TLogEntry & SetFile(const std::string &file)
Abstract TLogHandler base class.
virtual bool Emit(const TLogEntry &entry)=0
Emit a log entry.
A TLogHandler that multiplexes diagnostics to different client TLogHandlers.
void PushBack(std::unique_ptr< TLogHandler > handler)
Add a TLogHandler in the back - to be called after all others.
TLogManager(std::unique_ptr< TLogHandler > &&lh)
Initialize taking a TLogHandlerDefault.
static TLogManager & Get()
long long GetNumErrors() const
Returns the current number of errors seen by this log manager.
bool Emit(const TLogEntry &entry) override
Emit a log entry.
std::vector< std::unique_ptr< TLogHandler > > fHandlers
void PushFront(std::unique_ptr< TLogHandler > handler)
Add a TLogHandler in the front - to be called before all others.
long long GetNumWarnings() const
Returns the current number of warnings seen by this log manager.
ELogLevel
Kinds of diagnostics.
@ kInfo
Informational messages; used for instance for tracing.
@ kDebug
Debug information; only useful for developers.
@ kWarning
Warnings about likely unexpected behavior.
Namespace for new ROOT classes and functions.
basic_string_view< char > string_view