ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
anonymous_namespace{log.cpp} Namespace Reference

Enumerations

enum class  AnsiCode : int {
  Reset = 0 , BoldOn = 1 , Faint = 2 , ItalicOn = 3 ,
  UnderlineOn = 4 , SlowBlinkOn = 5 , RapidBlinkOn = 6 , ReverseVideoOn = 7 ,
  ConcealOn = 8 , CrossedOutOn = 9 , BoldOff = 22 , ItalicOff = 23 ,
  UnderlineOff = 24 , BlinkOff = 25 , ReverseVideoOff = 27 , ConcealOff = 28 ,
  CrossedOutOff = 29 , TextBlack = 30 , TextRed = 31 , TextGreen = 32 ,
  TextYellow = 33 , TextBlue = 34 , TextMagenta = 35 , TextCyan = 36 ,
  TextWhite = 37 , TextDefault = 39 , BgBlack = 40 , BgRed = 41 ,
  BgGreen = 42 , BgYellow = 43 , BgBlue = 44 , BgMagenta = 45 ,
  BgCyan = 46 , BgWhite = 47 , BgDefault = 49 , TextBrightBlack = 90 ,
  TextBrightRed = 91 , TextBrightGreen = 92 , TextBrightYellow = 93 , TextBrightBlue = 94 ,
  TextBrightMagenta = 95 , TextBrightCyan = 96 , TextBrightWhite = 97
}
 ANSI escape codes for terminal formatting. More...
 

Functions

const char * level_to_string (asw::log::Level level)
 
std::string ansi_to_string (AnsiCode code)
 
AnsiCode level_to_ansi (asw::log::Level level)
 
std::string get_timestamp ()
 

Variables

asw::log::Level current_level = asw::log::Level::INFO
 
std::ostream * output = &std::cerr
 

Enumeration Type Documentation

◆ AnsiCode

enum class anonymous_namespace{log.cpp}::AnsiCode : int
strong

ANSI escape codes for terminal formatting.

Enumerator
Reset 
BoldOn 
Faint 
ItalicOn 
UnderlineOn 
SlowBlinkOn 
RapidBlinkOn 
ReverseVideoOn 
ConcealOn 
CrossedOutOn 
BoldOff 
ItalicOff 
UnderlineOff 
BlinkOff 
ReverseVideoOff 
ConcealOff 
CrossedOutOff 
TextBlack 
TextRed 
TextGreen 
TextYellow 
TextBlue 
TextMagenta 
TextCyan 
TextWhite 
TextDefault 
BgBlack 
BgRed 
BgGreen 
BgYellow 
BgBlue 
BgMagenta 
BgCyan 
BgWhite 
BgDefault 
TextBrightBlack 
TextBrightRed 
TextBrightGreen 
TextBrightYellow 
TextBrightBlue 
TextBrightMagenta 
TextBrightCyan 
TextBrightWhite 

Definition at line 31 of file log.cpp.

Function Documentation

◆ ansi_to_string()

std::string anonymous_namespace{log.cpp}::ansi_to_string ( AnsiCode code)
inline

Definition at line 83 of file log.cpp.

◆ get_timestamp()

std::string anonymous_namespace{log.cpp}::get_timestamp ( )

Definition at line 105 of file log.cpp.

◆ level_to_ansi()

AnsiCode anonymous_namespace{log.cpp}::level_to_ansi ( asw::log::Level level)

Definition at line 88 of file log.cpp.

◆ level_to_string()

const char * anonymous_namespace{log.cpp}::level_to_string ( asw::log::Level level)

Definition at line 13 of file log.cpp.

Variable Documentation

◆ current_level

asw::log::Level anonymous_namespace{log.cpp}::current_level = asw::log::Level::INFO

Definition at line 10 of file log.cpp.

◆ output

std::ostream* anonymous_namespace{log.cpp}::output = &std::cerr

Definition at line 11 of file log.cpp.