28namespace Experimental {
150 void PushFront(std::unique_ptr<RLogHandler> handler) {
fHandlers.emplace_front(std::move(handler)); }
153 void PushBack(std::unique_ptr<RLogHandler> handler) {
fHandlers.emplace_back(std::move(handler)); }
220 const std::string &funcname)
324#define R__LOG_PRETTY_FUNCTION __FUNCSIG__
326#define R__LOG_PRETTY_FUNCTION __PRETTY_FUNCTION__
344#define R__LOG_TO_CHANNEL(SEVERITY, CHANNEL) \
345 ((SEVERITY < ROOT::Experimental::ELogLevel::kInfo + 0) || \
346 ROOT::Experimental::Internal::GetChannelOrManager(CHANNEL).GetEffectiveVerbosity( \
347 ROOT::Experimental::RLogManager::Get()) >= SEVERITY) && \
348 ROOT::Experimental::Detail::RLogBuilder(SEVERITY, ROOT::Experimental::Internal::GetChannelOrManager(CHANNEL), \
349 __FILE__, __LINE__, R__LOG_PRETTY_FUNCTION)
361#define R__LOG_FATAL(...) R__LOG_TO_CHANNEL(ROOT::Experimental::ELogLevel::kFatal, __VA_ARGS__)
362#define R__LOG_ERROR(...) R__LOG_TO_CHANNEL(ROOT::Experimental::ELogLevel::kError, __VA_ARGS__)
363#define R__LOG_WARNING(...) R__LOG_TO_CHANNEL(ROOT::Experimental::ELogLevel::kWarning, __VA_ARGS__)
364#define R__LOG_INFO(...) R__LOG_TO_CHANNEL(ROOT::Experimental::ELogLevel::kInfo, __VA_ARGS__)
365#define R__LOG_DEBUG(DEBUGLEVEL, ...) R__LOG_TO_CHANNEL(ROOT::Experimental::ELogLevel::kDebug + DEBUGLEVEL, __VA_ARGS__)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Builds a diagnostic entry, emitted by the static RLogManager upon destruction of this builder,...
RLogBuilder(ELogLevel level, RLogChannel &channel)
RLogBuilder(ELogLevel level, RLogChannel &channel, const std::string &filename, int line, const std::string &funcname)
RLogEntry fEntry
The log entry to be built.
~RLogBuilder()
Emit the log entry through the static log manager.
A log configuration for a channel, e.g.
RLogChannel(const std::string &name)
Construct a log channel given its name, which is part of the diagnostics.
ELogLevel fVerbosity
Verbosity of this channel. By default, use the global verbosity.
RLogChannel()=default
Construct an anonymous channel.
ELogLevel GetEffectiveVerbosity(const RLogManager &mgr) const
std::string fName
Name as shown in diagnostics.
ELogLevel GetVerbosity() const
ELogLevel SetVerbosity(ELogLevel verbosity)
const std::string & GetName() const
RLogChannel(ELogLevel verbosity)
Construct an anonymous channel with a default verbosity.
Keep track of emitted errors and warnings.
std::atomic< long long > fNumFatalErrors
Number of errors.
std::atomic< long long > fNumWarnings
void Increment(ELogLevel severity)
Increase warning or error count.
long long GetNumWarnings() const
Number of fatal errors.
std::atomic< long long > fNumErrors
Number of warnings.
long long GetNumFatalErrors() const
Returns the current number of fatal errors.
long long GetNumErrors() const
Returns the current number of errors.
A diagnostic that can be emitted by the RLogManager.
RLogEntry(ELogLevel level, RLogChannel &channel, const RLogLocation &loc)
RLogEntry(ELogLevel level, RLogChannel &channel)
Abstract RLogHandler base class.
virtual bool Emit(const RLogEntry &entry)=0
Emit a log entry.
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()
RLogManager(std::unique_ptr< RLogHandler > lh)
Initialize taking a RLogHandler.
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.
void PushBack(std::unique_ptr< RLogHandler > handler)
Add a RLogHandler in the back - to be called after all others.
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 RLogDiagCount has emitted since construction of *this.
bool HasWarningOccurred() const
Whether the RLogDiagCount has emitted a warnings since construction time of *this.
bool HasErrorOrWarningOccurred() const
Whether the RLogDiagCount has emitted an error or a warning since construction time of *this.
bool HasErrorOccurred() const
Whether the RLogDiagCount has emitted an error (fatal or not) since construction time of *this.
RLogScopedDiagCount(RLogDiagCount &cnt)
Construct the scoped count given a counter (e.g.
long long fInitialErrors
The number of the RLogDiagCount's emitted errors at construction time.
long long fInitialWarnings
The number of the RLogDiagCount's emitted warnings at construction time of *this.
long long GetAccumulatedErrors() const
Get the number of errors that the RLogDiagCount has emitted since construction of *this.
long long fInitialFatalErrors
The number of the RLogDiagCount's emitted fatal errors at construction time.
RLogScopedDiagCount()
Construct the scoped count for any diagnostic, whatever its channel.
long long GetAccumulatedFatalErrors() const
Get the number of errors that the RLogDiagCount has emitted since construction of *this.
Change the verbosity level (global or specific to the RLogChannel passed to the constructor) for the ...
RLogScopedVerbosity(RLogChannel &channel, ELogLevel verbosity)
RLogScopedVerbosity(ELogLevel verbosity)
RLogChannel & GetChannelOrManager()
ELogLevel operator+(ELogLevel severity, int offset)
ELogLevel
Kinds of diagnostics.
@ 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.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
A diagnostic location, part of an RLogEntry.