libqi-api  2.1.4.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 
20  class QI_API TailFileLogHandler : private boost::noncopyable
21  {
22  public:
24  TailFileLogHandler(const std::string &filePath);
26  virtual ~TailFileLogHandler();
27 
29  void log(const qi::LogLevel verb,
30  const qi::os::timeval date,
31  const char *category,
32  const char *msg,
33  const char *file,
34  const char *fct,
35  const int line);
36 
37  private:
38  PrivateTailFileLogHandler* _p;
39  }; // !TailFileLogHandler
40 
41  }; // !log
42 }; // !qi
43 
44 #endif // _QI_LOG_TAILFILELOGHANDLER_HPP_
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.
Keeps at most 2 MiB of logs.
LogLevel
Log level verbosity.
Definition: log.hpp:84
Convenient log macro.
#define QI_API
Definition: api.hpp:24