RTI Routing Service Version 7.2.0
LogConfig.hpp
1/*
2 (c) Copyright, Real-Time Innovations, 2017-
3 All rights reserved.
4
5 No duplications, whole or partial, manual or electronic, may be made without
6 express written permission. Any such copies, or revisions thereof, must
7 display this notice unaltered.
8
9 This code contains trade secrets of Real-Time Innovations, Inc.
10*/
11
12#ifndef HPP_ROUTING_LOG_LOG_CONFIG_HPP_
13#define HPP_ROUTING_LOG_LOG_CONFIG_HPP_
14
15#include <cstdio>
16#include <cstdarg>
17
18#include "log/log_common.h"
19#include "routingservice/routingservice_log.h"
20
21#include <rti/apputils/log/LogConfig.hpp>
22
23namespace rti { namespace routing { namespace log {
24
25class LogConfig : public rti::apputils::log::LogConfig {
26public:
27
28 static rti::routing::log::LogConfig& instance()
29 {
30 static rti::routing::log::LogConfig singleton;
31 return singleton;
32 }
33
34
35 void router_instrumentation_mask(RTILogBitmap logmask)
36 {
37 ROUTERLog_setBitmaps(mask_all(), logmask);
38 }
39
40 void update_router_bitmaps()
41 {
42 router_instrumentation_mask(instrumentation_mask_);
43 }
44
45private:
46
47 // Constructor is private: this class is a singleton
48 LogConfig()
49 {
50 update_router_bitmaps();
51 }
52};
53
54}}} // rti::routing::log
55
56#endif /* HPP_ROUTING_LOG_LOG_CONFIG_HPP_ */