mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-21 09:12:25 +08:00
loggerd: less error logging
old-commit-hash: 652ef27a7270ad770d8331347cffb2e3a4c07b45
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user