LogIt++
Loading...
Searching...
No Matches
Enums.hpp File Reference

Enumerations and utility functions for logging levels and text colors. More...

#include <array>
#include <string>

Go to the source code of this file.

Namespaces

namespace  logit
 The primary namespace for the LogIt++ library.
 

Macros

#define _LOGIT_ENUMS_HPP_INCLUDED
 

Enumerations

enum class  logit::LogLevel {
  logit::LOG_LVL_TRACE , logit::LOG_LVL_DEBUG , logit::LOG_LVL_INFO , logit::LOG_LVL_WARN ,
  logit::LOG_LVL_ERROR , logit::LOG_LVL_FATAL
}
 Logging levels. More...
 
enum class  logit::TextColor {
  logit::Black , logit::DarkRed , logit::DarkGreen , logit::DarkYellow ,
  logit::DarkBlue , logit::DarkMagenta , logit::DarkCyan , logit::LightGray ,
  logit::DarkGray , logit::Red , logit::Green , logit::Yellow ,
  logit::Blue , logit::Magenta , logit::Cyan , logit::White
}
 Text colors for console output. More...
 
enum class  logit::LoggerParam { logit::LastFileName , logit::LastFilePath , logit::LastLogTimestamp , logit::TimeSinceLastLog }
 Enumeration for different logger parameters that can be retrieved. More...
 

Functions

const char * logit::to_c_str (const LogLevel &level, const int &mode=0)
 Convert LogLevel to a C-style string representation.
 
std::string logit::to_string (const LogLevel &level, const int &mode=0)
 Convert LogLevel to a std::string representation.
 
const char * logit::to_c_str (const TextColor &color)
 Convert TextColor to a C-style string (ANSI escape codes).
 
std::string logit::to_string (const TextColor &color)
 Convert TextColor to a std::string (ANSI escape codes).
 
std::string logit::get_log_level_color (const LogLevel &log_level)
 Get the ANSI color code associated with a log level.
 

Detailed Description

Enumerations and utility functions for logging levels and text colors.

Definition in file Enums.hpp.

Macro Definition Documentation

◆ _LOGIT_ENUMS_HPP_INCLUDED

#define _LOGIT_ENUMS_HPP_INCLUDED

Definition at line 3 of file Enums.hpp.