Skip to content
Dimo Markov edited this page Jul 11, 2024 · 12 revisions

Main Functions

Logging happens mainly through the following variadic functions, each with its distinct style:

Logger::Section

Logger::Section(...);

Output:

image

Logger::Fatal

Logger::Fatal(...);
Logger::FatalTab(...);

Output:

image

Logger::Error

Logger::Error(...);
Logger::ErrorTab(...);

Output:

image

Logger::Warning

Logger::Warning(...);
Logger::WarningTab(...);

Output:

image

Logger::Verbose

Logger::Verbose(...);
Logger::VerboseTab(...);

Output:

image

Logger::Info

Logger::Info(...);
Logger::InfoTab(...);

Output:

image

Logger::Message

Logger::Message(...);
Logger::MessageTab(...);

Output:

image

Logger::Special

Logger::Special(...);
Logger::SpecialTab(...);

Output:

image

Logger::Flow

Logger::Flow(...);
Logger::FlowTab(...);

Output:

image

Logger::Input

Logger::Input(...);
Logger::InputTab(...);

Output:

image

Logger::Network

Logger::Network(...);
Logger::NetworkTab(...);

Output:

image

Logger::OS

Logger::OS(...);
Logger::OSTab(...);

Output:

image

Logger::Prompt

Logger::Prompt(...);
Logger::PromptTab(...);

Output:

image

Secondary Functions

Additionally, there are a couple of context-dependent calls, that don't modify styling:

Logger::Line

Logger::Line(...)

Logger::Append

Logger::Append(...)

Text arguments

All of the mentioned functions accept all string/character types, as well as types that are convertible to strings (either provided by you, or by {fmt} library). You can provide any number of arguments in two possible ways:

// Provided as variadic function arguments (recommended)
Logger::Special("The answer is ", 42, '!', " It's ", true, ", I tell ya!");
// Provided using std::cout style operator <<
Logger::Special() << "The answer is " << 42 << '!' << " It's " << true << ", I tell ya!";

Output:

image

Command arguments

Clone this wiki locally