27namespace Experimental {
66 std::vector<std::unique_ptr<RLogHandler>>
fHandlers;
81 void PushBack(std::unique_ptr<RLogHandler> handler) {
fHandlers.emplace_back(std::move(handler)); }
88 if (!handler->Emit(entry))
174#define R__LOG_PRETTY_FUNCTION __FUNCSIG__
176#define R__LOG_PRETTY_FUNCTION __PRETTY_FUNCTION__
179#define R__LOG_HERE(LEVEL, GROUP) \
180 ROOT::Experimental::RLogEntry(LEVEL, GROUP).SetFile(__FILE__).SetLine(__LINE__).SetFunction(R__LOG_PRETTY_FUNCTION)
182#define R__FATAL_HERE(GROUP) R__LOG_HERE(ROOT::Experimental::ELogLevel::kFatal, GROUP)
183#define R__ERROR_HERE(GROUP) R__LOG_HERE(ROOT::Experimental::ELogLevel::kError, GROUP)
184#define R__WARNING_HERE(GROUP) R__LOG_HERE(ROOT::Experimental::ELogLevel::kWarning, GROUP)
185#define R__INFO_HERE(GROUP) R__LOG_HERE(ROOT::Experimental::ELogLevel::kInfo, GROUP)
186#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 RLogManager has emitted since construction of *this.
bool HasErrorOrWarningOccurred() const
Whether the RLogManager has emitted an error or a warning since construction time of *this.
long long GetAccumulatedErrors() const
Get the number of errors that the RLogManager has emitted since construction of *this.
long long fInitialWarnings
The number of the RLogManager's emitted warnings at construction time of *this.
long long fInitialErrors
The number of the RLogManager's emitted errors at construction time.
bool HasWarningOccurred() const
Whether the RLogManager has emitted a warnings since construction time of *this.
bool HasErrorOccurred() const
Whether the RLogManager has emitted an error since construction time of *this.
A diagnostic, emitted by the RLogManager upon destruction of the RLogEntry.
RLogEntry(ELogLevel level, std::string_view group, std::string_view filename, int line, std::string_view funcname)
RLogEntry & SetLine(int line)
RLogEntry & SetFunction(const std::string &func)
RLogEntry(ELogLevel level, std::string_view group)
RLogEntry & SetFile(const std::string &file)
Abstract RLogHandler base class.
virtual bool Emit(const RLogEntry &entry)=0
Emit a log entry.
A RLogHandler that multiplexes diagnostics to different client RLogHandlers.
RLogManager(std::unique_ptr< RLogHandler > &&lh)
Initialize taking a RLogHandlerDefault.
long long GetNumWarnings() const
Returns the current number of warnings seen by this log manager.
static RLogManager & Get()
std::vector< std::unique_ptr< RLogHandler > > fHandlers
bool Emit(const RLogEntry &entry) override
Emit a log entry.
void PushFront(std::unique_ptr< RLogHandler > handler)
Add a RLogHandler in the front - to be called before all others.
long long GetNumErrors() const
Returns the current number of errors seen by this log manager.
void PushBack(std::unique_ptr< RLogHandler > handler)
Add a RLogHandler in the back - to be called after all others.
basic_string_view< char > string_view
ELogLevel
Kinds of diagnostics.
@ kDebug
Debug information; only useful for developers.