- 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 | List of all members
qi::log::FileLogHandler Class Reference

`#include <fileloghandler.hpp>`

## Public Member Functions
| FileLogHandler (const std::string &filePath)
| Initialize the file handler on the file. File is opened directly on construction. More...
virtual | ~FileLogHandler ()
| Closes the file. More...
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)
| Write logs messages on a file. More...

## Detailed Description

This class writes all logs to a file.

Definition at line 25 of file fileloghandler.hpp.

## Constructor & Destructor Documentation

qi::log::FileLogHandler::FileLogHandler | ( | const std::string & | filePath | ) |
| explicit

Initialize the file handler on the file. File is opened directly on construction.

Parameters

  filePath | the path to the file where log messages will be written.

    * .. warning::
    *
    *      If the file could not be opened, it logs a warning and every log call
    *      will silently fail.
    *

virtual qi::log::FileLogHandler::~FileLogHandler | ( |  | ) |
| virtual

Closes the file.

## Member Function Documentation

void qi::log::FileLogHandler::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
| ) |  |

Write logs messages on a file.

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.

If the file could not be opened, this function will silently fail, otherwise it will directly write the log message to the file and flush its output.

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

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