libqi-api
2.8.7.4
|
Print colored logs to the console. More...
#include <consoleloghandler.hpp>
Public Member Functions | |
ConsoleLogHandler () | |
~ConsoleLogHandler () | |
void | log (const qi::LogLevel verb, const qi::Clock::time_point date, const qi::SystemClock::time_point systemDate, const char *category, const char *msg, const char *file, const char *fct, const int line) |
Prints a log message on the console. More... | |
void | updateColor () |
Update color status (Never, Always, Auto) More... | |
Protected Attributes | |
PrivateConsoleLogHandler * | _p |
Print colored logs to the console.
Colors will only be enabled if the output is a tty.Definition at line 26 of file consoleloghandler.hpp.
qi::log::ConsoleLogHandler::ConsoleLogHandler | ( | ) |
Initialize everything the console log handler needs to print on the console with colors.
qi::log::ConsoleLogHandler::~ConsoleLogHandler | ( | ) |
Unloads any data managed by ConsoleLogHandler. Destructor is not virtual.
void qi::log::ConsoleLogHandler::log | ( | const qi::LogLevel | verb, |
const qi::Clock::time_point | date, | ||
const qi::SystemClock::time_point | systemDate, | ||
const char * | category, | ||
const char * | msg, | ||
const char * | file, | ||
const char * | fct, | ||
const int | line | ||
) |
Prints a log message on the console.
verb | verbosity of the log message. |
date | qi::Clock date at which the log message was issued. |
date | qi::SystemClock date at which the log message was issued. |
category | will be used in future for filtering |
msg | actual message to log. |
file | filename from which this log message was issued. |
fct | function name from which this log message was issued. |
line | line number in the issuer file. |
void qi::log::ConsoleLogHandler::updateColor | ( | ) |
Update color status (Never, Always, Auto)
|
protected |
Definition at line 63 of file consoleloghandler.hpp.