|
libqi-api
release-2.5.3-2016-11-18
|
#include <csvloghandler.hpp>
Public Member Functions | |
| CsvLogHandler (const std::string &filePath) | |
| Initialize the file handler on the file. File is opened directly on construction. More... | |
| ~CsvLogHandler () | |
| 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... | |
This class writes all logs to a file in csv format.
Definition at line 26 of file csvloghandler.hpp.
|
explicit |
Initialize the file handler on the file. File is opened directly on construction.
| 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. *
| qi::log::CsvLogHandler::~CsvLogHandler | ( | ) |
Closes the file.
| void qi::log::CsvLogHandler::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.
| verb | verbosity of the log message. |
| date | 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.