libqi-api  2.4.3.28
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
tailfileloghandler.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_TAILFILELOGHANDLER_HPP_
9 # define _QI_LOG_TAILFILELOGHANDLER_HPP_
10 
11 # include <boost/noncopyable.hpp>
12 # include <qi/log.hpp>
13 # include <string>
14 
15 namespace qi {
16  namespace log {
17  class PrivateTailFileLogHandler;
18 
30  class QI_API TailFileLogHandler : private boost::noncopyable
31  {
32  public:
44  TailFileLogHandler(const std::string &filePath);
45 
49  virtual ~TailFileLogHandler();
50 
66  void log(const qi::LogLevel verb,
67  const qi::Clock::time_point date,
68  const qi::SystemClock::time_point systemDate,
69  const char *category,
70  const char *msg,
71  const char *file,
72  const char *fct,
73  const int line);
74 
75  private:
76  PrivateTailFileLogHandler* _p;
77  }; // !TailFileLogHandler
78 
79  }; // !log
80 }; // !qi
81 
82 #endif // _QI_LOG_TAILFILELOGHANDLER_HPP_
#define QI_API
Definition: api.hpp:34
LogLevel
Log level verbosity.
Definition: log.hpp:133
boost::chrono::time_point< Clock > time_point
Definition: clock.hpp:87
Keeps at most 2 MiB of logs. <includename>qi/log/tailfileloghandler.hpp</includename> ...
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.
Convenient log macro.
boost::chrono::time_point< SystemClock > time_point
Definition: clock.hpp:169