loggerd: less error logging

old-commit-hash: 652ef27a72
vw-mqb-aeb
Adeeb Shihadeh 3 years ago
parent f96d34902f
commit 1c4b6e38e9
  1. 9
      selfdrive/loggerd/bootlog.cc
  2. 6
      selfdrive/loggerd/loggerd.cc

@ -23,20 +23,13 @@ static kj::Array<capnp::word> build_boot_log() {
std::string pstore = "/sys/fs/pstore";
std::map<std::string, std::string> pstore_map = util::read_files_in_dir(pstore);
const std::vector<std::string> log_keywords = {"Kernel panic"};
auto lpstore = boot.initPstore().initEntries(pstore_map.size());
int i = 0;
auto lpstore = boot.initPstore().initEntries(pstore_map.size());
for (auto& kv : pstore_map) {
auto lentry = lpstore[i];
lentry.setKey(kv.first);
lentry.setValue(capnp::Data::Reader((const kj::byte*)kv.second.data(), kv.second.size()));
i++;
for (auto &k : log_keywords) {
if (kv.second.find(k) != std::string::npos) {
LOGE("%s: found '%s'", kv.first.c_str(), k.c_str());
}
}
}
// Gather output of commands

@ -11,14 +11,14 @@ bool sync_encoders(LoggerdState *s, CameraType cam_type, uint32_t frame_id) {
update_max_atomic(s->start_frame_id, frame_id + 2);
if (std::exchange(s->camera_ready[cam_type], true) == false) {
++s->encoders_ready;
LOGE("camera %d encoder ready", cam_type);
LOGD("camera %d encoder ready", cam_type);
}
return false;
} else {
if (s->max_waiting == 1) update_max_atomic(s->start_frame_id, frame_id);
bool synced = frame_id >= s->start_frame_id;
s->camera_synced[cam_type] = synced;
if (!synced) LOGE("camera %d waiting for frame %d, cur %d", cam_type, (int)s->start_frame_id, frame_id);
if (!synced) LOGD("camera %d waiting for frame %d, cur %d", cam_type, (int)s->start_frame_id, frame_id);
return synced;
}
}
@ -244,7 +244,7 @@ void loggerd_thread() {
count++;
if (count >= 200) {
LOGE("large volume of '%s' messages", qs.name.c_str());
LOGD("large volume of '%s' messages", qs.name.c_str());
break;
}
}

Loading…
Cancel
Save