From 804e05ca17d2550ba7af15c15d357553510fcf63 Mon Sep 17 00:00:00 2001 From: RobinChenJP Date: Mon, 20 Mar 2023 10:59:30 +0800 Subject: [PATCH] dlt-logd-converter: Fix getting log level from log msg In AOSP, system/logging/liblog/logprint.cpp --> android_log_processLogBuffer: entry->priority = static_cast(msg[0]) msg[0] is used to obtain the log level --- src/android/dlt-logd-converter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/dlt-logd-converter.cpp b/src/android/dlt-logd-converter.cpp index 77e37a8ed..4c7075586 100644 --- a/src/android/dlt-logd-converter.cpp +++ b/src/android/dlt-logd-converter.cpp @@ -108,7 +108,7 @@ static uint32_t get_timestamp_from_log_msg(struct log_msg *log_msg) static DltLogLevelType get_log_level_from_log_msg(struct log_msg *log_msg) { - android_LogPriority priority = static_cast(log_msg->buf[0]); + android_LogPriority priority = static_cast(log_msg->msg()[0]); switch (priority) { case ANDROID_LOG_VERBOSE: return DLT_LOG_VERBOSE;