Skip to content

Commit

Permalink
put logcat in bootlog (commaai#23217)
Browse files Browse the repository at this point in the history
* put logcat in boot log

* continue

* use std::unique_ptr

* Revert "use std::unique_ptr"

This reverts commit c671f8c.
  • Loading branch information
deanlee authored Dec 14, 2021
1 parent 36db473 commit f042962
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions selfdrive/logcatd/logcatd_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions selfdrive/loggerd/bootlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f042962

Please sign in to comment.