- Aldebaran documentation |
- C++ Libraries |
- index

libqicore-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
logprovider.hpp
Go to the documentation of this file.
1 /*
2 ** Author(s):
3 ** - Herve Cuche <hcuche@aldebaran-robotics.com>
4 ** - Matthieu Nottale <mnottale@aldebaran-robotics.com>
5 **
6 ** Copyright (C) 2013 Aldebaran Robotics
7 */
8
9 #ifndef LOGPROVIDER_HPP_
10 #define LOGPROVIDER_HPP_
11
12 #include <string>
13 #include <utility> // std::pair
14 #include <vector>
15
16 #include <qi/log.hpp>
17
18 #include <qicore/api.hpp>
19 #include <qicore/logmessage.hpp>
20
21 #include <qi/anyobject.hpp>
22 #include <qi/session.hpp>
23
24 namespace qi
25 {
26 class LogManager;
27 using LogManagerPtr = qi::Object<LogManager>;
28
34 class QICORE_API LogProvider
35 {
36 protected:
37 LogProvider() = default;
38
39 public:
40 virtual ~LogProvider() = default;
41
42 virtual void setCategoryPrefix(const std::string& categoryPrefix) = 0;
43 virtual void setLevel(qi::LogLevel level) = 0;
44 virtual void addFilter(const std::string& filter, qi::LogLevel level) = 0;
45 virtual void setFilters(const std::vector<std::pair<std::string, qi::LogLevel> >& filters) = 0;
46 virtual void setLogger(LogManagerPtr logger) = 0;
47 };
48
49 using LogProviderPtr = qi::Object<LogProvider>;
50
51 QICORE_API LogProviderPtr makeLogProvider(LogManagerPtr logger);
52 QICORE_API LogProviderPtr makeLogProvider();
53
54 QICORE_API qi::FutureSync<qi::LogProviderPtr> initializeLogging(SessionPtr session,
55 const std::string& categoryPrefix = "");
56 } // !qi
57
58 #endif // !LOGPROVIDER_HPP_
logmessage.hpp
api.hpp
qi::LogProviderPtr
qi::Object< LogProvider > LogProviderPtr
Definition: logmanager.hpp:23
qi::LogProvider
Definition: logprovider.hpp:34
qi::LogManagerPtr
qi::Object< LogManager > LogManagerPtr
Definition: logmanager.hpp:42
qi::initializeLogging
qi::FutureSync< qi::LogProviderPtr > initializeLogging(SessionPtr session, const std::string &categoryPrefix="")
qi::makeLogProvider
LogProviderPtr makeLogProvider(LogManagerPtr logger)
QICORE_API
#define QICORE_API
Definition: api.hpp:14