-
Notifications
You must be signed in to change notification settings - Fork 0
API
Dimo Markov edited this page Jul 11, 2024
·
12 revisions
Logging happens mainly through the following variadic functions, each with its distinct style:
Logger::Section(...);
Output:
Logger::Fatal(...);
Logger::FatalTab(...);
Output:
Logger::Error(...);
Logger::ErrorTab(...);
Output:
Logger::Warning(...);
Logger::WarningTab(...);
Output:
Logger::Verbose(...);
Logger::VerboseTab(...);
Output:
Logger::Info(...);
Logger::InfoTab(...);
Output:
Logger::Message(...);
Logger::MessageTab(...);
Output:
Logger::Special(...);
Logger::SpecialTab(...);
Output:
Logger::Flow(...);
Logger::FlowTab(...);
Output:
Logger::Input(...);
Logger::InputTab(...);
Output:
Logger::Network(...);
Logger::NetworkTab(...);
Output:
Logger::OS(...);
Logger::OSTab(...);
Output:
Logger::Prompt(...);
Logger::PromptTab(...);
Output:
Additionally, there are a couple of context-dependent calls, that don't modify styling:
Logger::Line(...)
Logger::Append(...)
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: