Add the channel and node name to the missing data error
Channel index and node index aren't helpful enough when trying to debug.
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
Change-Id: I304770afb22485b32063a27f54a34fe0cdd5922f
diff --git a/aos/events/logging/log_reader.cc b/aos/events/logging/log_reader.cc
index 5fe61cd..f306492 100644
--- a/aos/events/logging/log_reader.cc
+++ b/aos/events/logging/log_reader.cc
@@ -841,9 +841,11 @@
LOG(FATAL)
<< "Found missing data in the middle of the log file on "
"channel "
- << next.channel_index << " " << next << " Last "
- << last_message[next.channel_index] << " "
- << state->DebugString();
+ << next.channel_index << " "
+ << configuration::StrippedChannelToString(
+ logged_configuration()->channels()->Get(
+ next.channel_index))
+ << " " << next << " " << state->DebugString();
}
}
}
diff --git a/aos/events/logging/logfile_utils.cc b/aos/events/logging/logfile_utils.cc
index 8a10876..bd396c7 100644
--- a/aos/events/logging/logfile_utils.cc
+++ b/aos/events/logging/logfile_utils.cc
@@ -1324,7 +1324,7 @@
std::string TimestampMapper::DebugString() const {
std::stringstream ss;
- ss << "node " << node() << " [\n";
+ ss << "node " << node() << " (" << node_name() << ") [\n";
for (const Message &message : messages_) {
ss << " " << message << "\n";
}