- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

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

## Detailed Description

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.

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

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.

Parameters

  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)

## Member Data Documentation

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

Definition at line 63 of file consoleloghandler.hpp.

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

- /home/opennao/work/release-2.8/sdk/libqi/qi/log/consoleloghandler.hpp