put logcat in bootlog (#23217)

* put logcat in boot log

* continue

* use std::unique_ptr

* Revert "use std::unique_ptr"

This reverts commit c671f8ca71.
pull/23220/head
Dean Lee 2021-12-15 03:54:54 +08:00 committed by GitHub
parent 36db473bab
commit f042962933
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -14,8 +14,10 @@ int main() {
ExitHandler do_exit;
PubMaster pm({"androidLog"});
log_time last_log_time = {};
logger_list *logger_list = android_logger_list_alloc(ANDROID_LOG_RDONLY | ANDROID_LOG_NONBLOCK, 0, 0);
struct timespec cur_time;
clock_gettime(CLOCK_REALTIME, &cur_time);
log_time last_log_time(cur_time);
logger_list *logger_list = nullptr;
while (!do_exit) {
// setup android logging

View File

@ -11,6 +11,8 @@ static kj::Array<capnp::word> build_boot_log() {
if (Hardware::TICI()) {
bootlog_commands.push_back("journalctl");
bootlog_commands.push_back("sudo nvme smart-log --output-format=json /dev/nvme0");
} else if (Hardware::EON()) {
bootlog_commands.push_back("logcat -d");
}
MessageBuilder msg;