gz-cpp-util 1.3
A c++20 library containing various utilities
log.hpp File Reference

A logger capable of logging lots of different types and containers to stdout and/or a logfile. More...

#include <vector>
#include "string/to_string.hpp"
#include <iostream>
#include <string>

Go to the source code of this file.

Classes

struct  gz::LogCreateInfo
 Create info for a Log object. More...
 
class  gz::Log
 Manages printing messages to stdout and to logfiles. More...
 

Concepts

concept  gz::Logable
 Define types that can be logged with Log.
 

Enumerations

enum  gz::Color {
  RESET , BLACK , RED , GREEN ,
  YELLOW , BLUE , MAGENTA , CYAN ,
  WHITE , BO_BLACK , BO_RED , BO_GREEN ,
  BO_YELLOW , BO_BLUE , BO_MAGENTA , BO_CYAN ,
  BO_WHITE , BG_BLACK , BG_RED , BG_GREEN ,
  BG_YELLOW , BG_BLUE , BG_MAGENTA , BG_CYAN ,
  BG_WHITE , LI_RED , LI_GREEN , LI_YELLOW ,
  LI_BLUE , LI_MAGENTA , LI_CYAN , LI_WHITE ,
  LI_BLACK
}
 Colors to be used in Log::clog.
 

Variables

constexpr unsigned int gz::LOG_RESERVE_STRING_SIZE = 100
 Reserve a string size for each string in logArray. Set to 0 if you do not want to reserve memory for strings.
 
constexpr unsigned int gz::ARG_COUNT_RESERVE_COUNT = 6
 
constexpr unsigned int gz::LOG_TIMESTAMP_CHAR_COUNT = 22
 
constexpr unsigned int gz::LOG_POSTPREFIX_CHAR_COUNT = 2
 

Detailed Description

A logger capable of logging lots of different types and containers to stdout and/or a logfile.