Handle log files not starting at the same time.
The monotonic clocks were assumed to be in sync. That isn't realistic.
This assumption leaked into how we kept the queues primed, and how the
event loop was initialized.
This isn't enough to actually replay in sync. We are assuming that the
realtime clocks are in sync and the monotonic clocks don't drift from
each other. That'll be good enough to get started, but not for long.
Change-Id: Ic18e31598f1a76edee0b0d5a2d7936deee1fbfec
diff --git a/aos/events/logging/logger_main.cc b/aos/events/logging/logger_main.cc
index 74e9f65..5288e9b 100644
--- a/aos/events/logging/logger_main.cc
+++ b/aos/events/logging/logger_main.cc
@@ -22,8 +22,13 @@
aos::ShmEventLoop event_loop(&config.message());
- aos::logger::DetachedBufferWriter writer(aos::logging::GetLogName("fbs_log"));
- aos::logger::Logger logger(&writer, &event_loop);
+ std::unique_ptr<aos::logger::LogNamer> log_namer =
+ std::make_unique<aos::logger::MultiNodeLogNamer>(
+ aos::logging::GetLogName("fbs_log"), event_loop.configuration(),
+ event_loop.node());
+
+ aos::logger::Logger logger(std::move(log_namer), &event_loop,
+ std::chrono::milliseconds(100));
event_loop.Run();