21enum class LogLevel { kDebug, kInfo, kWarning, kCritical };
50 void logInfo(
const std::string &msg)
const;
56 void logDebug(
const std::string &msg)
const;
65 void logNewPeer(
const std::string &ip, uint16_t port, solanet::UUID uuid,
66 const std::string &topic)
const;
75 void logRemovePeer(
const std::string &ip, uint16_t port, solanet::UUID uuid,
76 const std::string &topic)
const;
84 void logNewMessage(
const std::string &topic,
const std::string &msg, solanet::UUID msg_uuid);
92 void logSendFullMsg(solanet::UUID msg_uuid, solanet::UUID uuid, solanet::UUID own_uuid);
100 void logReceiveFullMsg(solanet::UUID msg_uuid, solanet::UUID sender, solanet::UUID own_uuid);
102 void logMinhcastBroadcast(solanet::UUID msg_id, uint32_t level, uint32_t number,
103 uint32_t forward_up_limit, uint32_t forward_down_limit);
105 void logNewNetworkPeer(solanet::UUID uuid,
const std::string &ip, uint16_t port,
int level,
108 void logReceivedMessages(solanet::UUID node_uuid, solanet::UUID initial_sender,
109 solanet::UUID message, uint32_t round);
140 template <
typename LogFunction>
void log(LogFunction function)
const;
142 std::vector<LoggerPtr> logger_list_;
144 LogLevel log_level_ = LogLevel::kWarning;
146 bool log_strings_ =
true;