Thunderbots Project
Loading...
Searching...
No Matches
network_logger.h
1#pragma once
2
3#include <g3log/g3log.hpp>
4#include <g3log/loglevels.hpp>
5#include <g3log/logmessage.hpp>
6#include <g3log/logworker.hpp>
7
8#include "software/logger/coloured_cout_sink.h"
9#include "software/logger/network_sink.h"
10#include "software/world/robot_state.h"
11
12static const std::string CSV_PATH = "/tmp";
13
18{
19 public:
24 static void initializeLogger(RobotId robot_id, bool enable_log_merging);
25
30 static void replaceUdpSender(
31 std::shared_ptr<ThreadedProtoUdpSender<TbotsProto::RobotLog>> new_sender);
32
33 private:
34 NetworkLoggerSingleton(RobotId robot_id, bool enable_log_merging);
35
36 std::unique_ptr<g3::LogWorker> logWorker;
37 std::unique_ptr<g3::SinkHandle<NetworkSink>> network_sink_handle;
38
39 static std::shared_ptr<NetworkLoggerSingleton> instance;
40};
Definition network_logger.h:18
static void initializeLogger(RobotId robot_id, bool enable_log_merging)
Definition network_logger.cpp:30
static void replaceUdpSender(std::shared_ptr< ThreadedProtoUdpSender< TbotsProto::RobotLog > > new_sender)
Definition network_logger.cpp:39
Definition threaded_proto_udp_sender.hpp:12