log current bootlog (#27645)

* log current bootlog

* rm path

* mv that

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: be659c976c633876a58ee282550f9ccf52a1e504
This commit is contained in:
Adeeb Shihadeh
2023-03-21 17:28:38 -07:00
committed by GitHub
parent 5814ecfbfe
commit 3913d4197f
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -2,6 +2,7 @@
#include <string>
#include "cereal/messaging/messaging.h"
#include "common/params.h"
#include "common/swaglog.h"
#include "system/loggerd/logger.h"
@@ -48,7 +49,8 @@ static kj::Array<capnp::word> build_boot_log() {
}
int main(int argc, char** argv) {
const std::string path = LOG_ROOT + "/boot/" + logger_get_route_name();
const std::string timestr = logger_get_route_name();
const std::string path = LOG_ROOT + "/boot/" + timestr;
LOGW("bootlog to %s", path.c_str());
// Open bootlog
@@ -61,5 +63,8 @@ int main(int argc, char** argv) {
// Write bootlog
file.write(build_boot_log().asBytes());
// Write out bootlog param to match routes with bootlog
Params().put("CurrentBootlog", timestr.c_str());
return 0;
}