libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fileloghandler.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_FILELOGHANDLER_HPP_
9 #define _QI_LOG_FILELOGHANDLER_HPP_
10 
11 #include <boost/noncopyable.hpp>
12 #include <qi/log.hpp>
13 
14 namespace qi
15 {
16 namespace log
17 {
18  struct PrivateFileLogHandler;
19 
25  class QI_API FileLogHandler : private boost::noncopyable
26  {
27  public:
39  explicit FileLogHandler(const std::string& filePath);
40 
44  virtual ~FileLogHandler();
45 
60  void log(const qi::LogLevel verb,
61  const qi::Clock::time_point date,
62  const qi::SystemClock::time_point systemDate,
63  const char* category,
64  const char* msg,
65  const char* file,
66  const char* fct,
67  const int line);
68 
69  private:
70  PrivateFileLogHandler* _p;
71  }; // !FileLogHandler
72 
73 }; // !log
74 }; // !qi
75 
76 #endif // _QI_LOG_FILELOGHANDLER_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