libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
csvloghandler.hpp
Go to the documentation of this file.
1 #pragma once
2 /*
3  * Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the COPYING file.
6  */
7 
8 #ifndef _QI_LOG_CSVLOGHANDLER_HPP_
9 #define _QI_LOG_CSVLOGHANDLER_HPP_
10 
11 #include <boost/noncopyable.hpp>
12 #include <boost/scoped_ptr.hpp>
13 #include <qi/log.hpp>
14 
15 namespace qi
16 {
17 namespace log
18 {
19  struct PrivateCsvLogHandler;
20 
26  class QI_API CsvLogHandler : private boost::noncopyable
27  {
28  public:
40  explicit CsvLogHandler(const std::string& filePath);
41 
45  ~CsvLogHandler();
46 
61  void log(const qi::LogLevel verb,
62  const qi::Clock::time_point date,
63  const qi::SystemClock::time_point systemDate,
64  const char* category,
65  const char* msg,
66  const char* file,
67  const char* fct,
68  const int line);
69 
70  private:
71  boost::scoped_ptr<PrivateCsvLogHandler> _p;
72  }; // !CsvLogHandler
73 
74 }; // !log
75 }; // !qi
76 
77 #endif // _QI_LOG_CSVLOGHANDLER_HPP_
#define QI_API
Definition: api.hpp:33
LogLevel
Log level verbosity.
Definition: log.hpp:140
void log(const qi::LogLevel verb, const char *category, const char *msg, const char *file="", const char *fct="", const int line=0)
Log function. You should call qiLog* macros instead.
boost::chrono::time_point< Clock > time_point
Definition: clock.hpp:96
Convenient log macro.
boost::chrono::time_point< SystemClock > time_point
Definition: clock.hpp:178