LLVM OpenMP 22.0.0git
Logging.h File Reference

Provides ompTest-tailored logging, with log-levels and formatting/coloring. More...

#include "OmptAssertEvent.h"
#include <iostream>
#include <map>
#include <mutex>
#include <set>
#include <sstream>
#include <string>

Go to the source code of this file.

Classes

class  omptest::logging::Logger

Namespaces

namespace  omptest
namespace  omptest::logging

Enumerations

enum class  omptest::logging::Level : uint32_t {
  omptest::logging::Diagnostic = 10 , omptest::logging::Info = 20 , omptest::logging::Warning = 30 , omptest::logging::Error = 40 ,
  omptest::logging::Critical = 50 , omptest::logging::Default , omptest::logging::ExpectedEvent , omptest::logging::ObservedEvent ,
  omptest::logging::OffendingEvent , omptest::logging::Silent = 0xFFFFFFFF
}
enum class  omptest::logging::FormatOption : uint32_t {
  omptest::logging::None = 0 , omptest::logging::Bold = 1 , omptest::logging::Dim = 2 , omptest::logging::Underlined = 4 ,
  omptest::logging::Blink = 5 , omptest::logging::Inverted = 7 , omptest::logging::Hidden = 8 , omptest::logging::ColorDefault = 39 ,
  omptest::logging::ColorBlack = 30 , omptest::logging::ColorRed = 31 , omptest::logging::ColorGreen = 32 , omptest::logging::ColorYellow = 33 ,
  omptest::logging::ColorBlue = 34 , omptest::logging::ColorMagenta = 35 , omptest::logging::ColorCyan = 36 , omptest::logging::ColorLightGray = 37 ,
  omptest::logging::ColorDarkGray = 90 , omptest::logging::ColorLightRed = 91 , omptest::logging::ColorLightGreen = 92 , omptest::logging::ColorLightYellow = 93 ,
  omptest::logging::ColorLightBlue = 94 , omptest::logging::ColorLightMagenta = 95 , omptest::logging::ColorLightCyan = 96 , omptest::logging::ColorWhite = 97 ,
  omptest::logging::ColorBackgroundDefault = 49 , omptest::logging::ColorBackgroundBlack = 40 , omptest::logging::ColorBackgroundRed = 41 , omptest::logging::ColorBackgroundGreen = 42 ,
  omptest::logging::ColorBackgroundYellow = 43 , omptest::logging::ColorBackgroundBlue = 44 , omptest::logging::ColorBackgroundMagenta = 45 , omptest::logging::ColorBackgroundCyan = 46 ,
  omptest::logging::ColorBackgroundLightGray = 47 , omptest::logging::ColorBackgroundDarkGray = 100 , omptest::logging::ColorBackgroundLightRed = 101 , omptest::logging::ColorBackgroundLightGreen = 102 ,
  omptest::logging::ColorBackgroundLightYellow = 103 , omptest::logging::ColorBackgroundLightBlue = 104 , omptest::logging::ColorBackgroundLightMagenta = 105 , omptest::logging::ColorBackgroundLightCyan = 106 ,
  omptest::logging::ColorBackgroundWhite = 107
}

Functions

const charomptest::logging::to_string (Level LogLevel)
 Returns a string representation of the given logging level.
std::string omptest::logging::getFormatSequence (Level LogLevel=Level::Default)
 Returns the format options as escaped sequence, for the given logging level.
std::string omptest::logging::format (const std::string &Message, FormatOption Option)
 Format the given message with the provided option(s) and return it.
std::string omptest::logging::format (const std::string &Message, std::set< FormatOption > Options)

Detailed Description

Provides ompTest-tailored logging, with log-levels and formatting/coloring.

Definition in file Logging.h.