Improve failed to find boot message
Change-Id: I05cda7ff53b2a3355ca6c812dc5b0e02d33b356d
Signed-off-by: milind-u <milind.upadhyay@gmail.com>
diff --git a/aos/events/logging/log_namer.cc b/aos/events/logging/log_namer.cc
index a880f35..9830a61 100644
--- a/aos/events/logging/log_namer.cc
+++ b/aos/events/logging/log_namer.cc
@@ -107,9 +107,9 @@
QueueHeader(MakeHeader());
}
CHECK_EQ(state_[node_index_].boot_uuid, source_node_boot_uuid);
+ CHECK(writer);
CHECK(header_written_) << ": Attempting to write message before header to "
<< writer->filename();
- CHECK(writer);
writer->QueueSizedFlatbuffer(fbb, now);
}
diff --git a/aos/events/logging/logfile_utils.cc b/aos/events/logging/logfile_utils.cc
index 20e38d2..37bf9a9 100644
--- a/aos/events/logging/logfile_utils.cc
+++ b/aos/events/logging/logfile_utils.cc
@@ -704,9 +704,13 @@
size_t monotonic_remote_boot = 0xffffff;
if (m.value().message().has_monotonic_remote_time()) {
+ const Node *node = parts().config->nodes()->Get(
+ source_node_index_[m->message().channel_index()]);
+
std::optional<size_t> boot = parts_message_reader_.boot_count(
source_node_index_[m->message().channel_index()]);
- CHECK(boot) << ": Failed to find boot for node "
+ CHECK(boot) << ": Failed to find boot for node " << MaybeNodeName(node)
+ << ", with index "
<< source_node_index_[m->message().channel_index()];
monotonic_remote_boot = *boot;
}