libqi-api  2.1.4.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  namespace log {
16  class PrivateFileLogHandler;
17 
19  class QI_API FileLogHandler : private boost::noncopyable
20  {
21  public:
24  explicit FileLogHandler(const std::string& filePath);
25 
27  virtual ~FileLogHandler();
28 
30  void log(const qi::LogLevel verb,
31  const qi::os::timeval date,
32  const char *category,
33  const char *msg,
34  const char *file,
35  const char *fct,
36  const int line);
37 
38  private:
39  PrivateFileLogHandler* _p;
40  }; // !FileLogHandler
41 
42  }; // !log
43 }; // !qi
44 
45 #endif // _QI_LOG_FILELOGHANDLER_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.
Log messages to a file.
LogLevel
Log level verbosity.
Definition: log.hpp:84
Convenient log macro.
#define QI_API
Definition: api.hpp:24