SOLA
Loading...
Searching...
No Matches
logger_interface.h
1// Copyright The SOLA Contributors
2//
3// Licensed under the MIT License.
4// For details on the licensing terms, see the LICENSE file.
5// SPDX-License-Identifier: MIT
6
7#ifndef MINHTON_LOGGING_LOGGER_INTERFACE_H_
8#define MINHTON_LOGGING_LOGGER_INTERFACE_H_
9
10#include <string>
11#include <vector>
12
13#include "minhton/core/constants.h"
14#include "minhton/message/message_logging.h"
15#include "solanet/uuid.h"
16
17namespace minhton {
18
20 uint64_t timestamp;
21 uint64_t event_id;
22 SearchExactTestEntryTypes status;
23 uint32_t sender_level;
24 uint32_t sender_number;
25 uint32_t target_level;
26 uint32_t target_number;
27 uint32_t hop_level;
28 uint32_t hop_number;
29};
30
32 std::string position_uuid;
33 uint32_t level;
34 uint32_t number;
35 uint16_t fanout;
36 bool initialized;
37};
38
40 uint64_t event_id;
41 std::string node_uuid;
42 std::string neighbor_node_uuid;
43 NeighborRelationship relationship;
44};
45
47 uint64_t timestamp;
48 minhton::EventType event_type;
49 uint64_t event_id;
50};
51
53 std::string position_uuid;
54 uint64_t event_id;
55};
56
58 uint64_t timestamp;
59 std::string node_uuid;
60 ContentStatus content_status;
61 std::string attribute_name;
62 uint8_t content_type;
63 std::string content_text;
64};
65
67 std::string ip;
68 uint16_t port;
69};
70
72 uint64_t timestamp;
73 uint64_t event_id;
74 std::string node_uuid;
75 bool inquire_unknown;
76 bool inquire_outdated;
77 std::string query;
78};
79
81 uint64_t timestamp;
82 uint64_t event_id;
83 std::string node_uuid;
84};
85
87public:
88 explicit LoggerInterface(std::string uuid) : uuid_(std::move(uuid)) {}
89 virtual ~LoggerInterface() = default;
90
91 virtual void logCritical(const std::string &msg) const = 0;
92 virtual void logWarning(const std::string &msg) const = 0;
93 virtual void logInfo(const std::string &msg) const = 0;
94 virtual void logDebug(const std::string &msg) const = 0;
95
96 // Used for loggers which are initialized before node starts
97 virtual void setApplicationUUID(const solanet::UUID &app_uuid) = 0;
98
99 virtual void logNodeUninit(const LoggerInfoNodeState &info) = 0;
100 virtual void logNodeRunning(const LoggerInfoNodeState &info) = 0;
101 virtual void logNodeLeft(const LoggerInfoNodeState &info) = 0;
102 virtual void logPhysicalNodeInfo(const LoggerPhysicalNodeInfo &info) = 0;
103 virtual void logNode(const LoggerInfoAddNode &info) = 0;
104 virtual void logNeighbor(const LoggerInfoAddNeighbor &info) = 0;
105 virtual void logEvent(const LoggerInfoAddEvent &info) = 0;
106 virtual void logSearchExactTest(const LoggerInfoSearchExact &info) = 0;
107 virtual void logTraffic(const MessageLoggingInfo &info) = 0;
108 virtual void logContent(const LoggerInfoAddContent &info) = 0;
109 virtual void logFindQuery(const LoggerInfoAddFindQuery &info) = 0;
110 virtual void logFindQueryResult(const LoggerInfoAddFindQueryResult &info) = 0;
111
112protected:
113 std::string uuid_;
114};
115
116} // namespace minhton
117
118#endif
Definition logger_interface.h:86
Definition minhton_watchdog_ns3.cpp:24
Definition message_logging.h:23
Definition logger_interface.h:57
Definition logger_interface.h:46
Definition logger_interface.h:80
Definition logger_interface.h:71
Definition logger_interface.h:39
Definition logger_interface.h:31
Definition logger_interface.h:52
Definition logger_interface.h:19
Definition logger_interface.h:66