libqi-api  2.0.6.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Attributes
qi::log::ConsoleLogHandler Class Reference

Print colored logs to the console. More...

#include <consoleloghandler.hpp>

List of all members.

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.
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

Initialize everything the console log handler needs to print on the console with colors.

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.

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines