LLVM OpenMP 22.0.0git
omptest::logging::Logger Class Reference

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/openmp/tools/omptest/include/Logging.h"

Public Member Functions

 Logger (Level LogLevel=Level::Warning, std::ostream &OutStream=std::cerr, bool FormatOutput=true)
 ~Logger ()
void log (const std::string &Message, Level LogLevel) const
 Log the given message to the output.
void logEventMismatch (const std::string &Message, const omptest::OmptAssertEvent &OffendingEvent, Level LogLevel=Level::Error) const
 Log a single event mismatch.
void logEventMismatch (const std::string &Message, const omptest::OmptAssertEvent &ExpectedEvent, const omptest::OmptAssertEvent &ObservedEvent, Level LogLevel=Level::Error) const
 Log an event-pair mismatch.
void setFormatOutput (bool Enabled)
 Set if output is being formatted (e.g. colored).
Level getLoggingLevel () const
 Return the current (minimum) Logging Level.
void setLoggingLevel (Level LogLevel)
 Set the (minimum) Logging Level.

Detailed Description

Definition at line 109 of file Logging.h.

Constructor & Destructor Documentation

◆ Logger()

Logger::Logger ( Level LogLevel = Level::Warning,
std::ostream & OutStream = std::cerr,
bool FormatOutput = true )

Definition at line 19 of file Logging.cpp.

◆ ~Logger()

Logger::~Logger ( )

Definition at line 25 of file Logging.cpp.

Member Function Documentation

◆ getLoggingLevel()

Level Logger::getLoggingLevel ( ) const

Return the current (minimum) Logging Level.

Definition at line 179 of file Logging.cpp.

◆ log()

void Logger::log ( const std::string & Message,
Level LogLevel ) const

Log the given message to the output.

Definition at line 95 of file Logging.cpp.

References omptest::logging::getFormatSequence(), and omptest::logging::to_string().

◆ logEventMismatch() [1/2]

void Logger::logEventMismatch ( const std::string & Message,
const omptest::OmptAssertEvent & ExpectedEvent,
const omptest::OmptAssertEvent & ObservedEvent,
Level LogLevel = Level::Error ) const

◆ logEventMismatch() [2/2]

void Logger::logEventMismatch ( const std::string & Message,
const omptest::OmptAssertEvent & OffendingEvent,
Level LogLevel = Level::Error ) const

◆ setFormatOutput()

void Logger::setFormatOutput ( bool Enabled)

Set if output is being formatted (e.g. colored).

Definition at line 177 of file Logging.cpp.

◆ setLoggingLevel()

void Logger::setLoggingLevel ( Level LogLevel)

Set the (minimum) Logging Level.

Definition at line 181 of file Logging.cpp.


The documentation for this class was generated from the following files: