mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
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:
@@ -98,6 +98,7 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"CarVin", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
|
||||
{"CompletedTrainingVersion", PERSISTENT},
|
||||
{"ControlsReady", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
|
||||
{"CurrentBootlog", PERSISTENT},
|
||||
{"CurrentRoute", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
|
||||
{"DisableLogging", CLEAR_ON_MANAGER_START | CLEAR_ON_IGNITION_ON},
|
||||
{"DisablePowerDown", PERSISTENT},
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user