libqi  1.14
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
headfileloghandler.hpp
1 /*
2  * Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the COPYING file.
5  */
6 
7 #pragma once
8 #ifndef _LIBQI_QI_LOG_HEADFILELOGHANDLER_HPP_
9 #define _LIBQI_QI_LOG_HEADFILELOGHANDLER_HPP_
10 
11 # include <qi/log.hpp>
12 # include <string>
13 
14 namespace qi {
15  namespace log {
16  class PrivateHeadFileLogHandler;
17 
22  class QI_API HeadFileLogHandler
23  {
24  public:
25  HeadFileLogHandler(const std::string &filePath,
26  int length = 2000);
27  virtual ~HeadFileLogHandler();
28 
29  void log(const qi::log::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:
39  PrivateHeadFileLogHandler* _private;
40  }; // !HeadFileLogHandler
41 
42  }; // !log
43 }; // !qi
44 
45 #endif // _LIBQI_QI_LOG_HEADFILELOGHANDLER_HPP_