libqi-api  2.1.4.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
qi::log::ConsoleLogHandler Class Reference

Print colored logs to the console. More...

#include <consoleloghandler.hpp>

Public Member Functions

 ConsoleLogHandler ()
 
 ~ConsoleLogHandler ()
 
void log (const qi::LogLevel verb, const qi::os::timeval date, 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 ()
 

Protected Attributes

PrivateConsoleLogHandler * _p
 

Detailed Description

Print colored logs to the console.

Colors will only be enabled if the output is a tty.

Definition at line 21 of file consoleloghandler.hpp.

Constructor & Destructor Documentation

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.

Member Function Documentation

qi::log::ConsoleLogHandler::log ( const qi::LogLevel  verb,
const qi::os::timeval  date,
const char *  category,
const char *  msg,
const char *  file,
const char *  fct,
const int  line 
)

Prints a log message on the console.

Parameters
verbverbosity of the log message.
datedate at which the log message was issued.
categorywill be used in future for filtering
msgactual message to log.
filefilename from which this log message was issued.
fctfunction name from which this log message was issued.
lineline number in the issuer file.
void qi::log::ConsoleLogHandler::updateColor ( )

Member Data Documentation

PrivateConsoleLogHandler* qi::log::ConsoleLogHandler::_p
protected

Definition at line 45 of file consoleloghandler.hpp.


The documentation for this class was generated from the following files: