libqi-api  2.1.4.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
consoleloghandler.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 
9 #ifndef _QI_LOG_CONSOLELOGHANDLER_HPP_
10 #define _QI_LOG_CONSOLELOGHANDLER_HPP_
11 
12 # include <boost/noncopyable.hpp>
13 # include <qi/log.hpp>
14 
15 namespace qi {
16  namespace log {
17 
18  class PrivateConsoleLogHandler;
19 
21  class QI_API ConsoleLogHandler : private boost::noncopyable
22  {
23  public:
27 
31 
33  void log(const qi::LogLevel verb,
34  const qi::os::timeval date,
35  const char *category,
36  const char *msg,
37  const char *file,
38  const char *fct,
39  const int line);
40 
41  void updateColor();
42 
43 
44  protected:
45  PrivateConsoleLogHandler* _p;
46  };
47  }
48 }
49 
50 
51 #endif // _QI_LOG_CONSOLELOGHANDLER_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.
PrivateConsoleLogHandler * _p
Print colored logs to the console.
LogLevel
Log level verbosity.
Definition: log.hpp:84
Convenient log macro.
#define QI_API
Definition: api.hpp:24