summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhnatiuk1 <93189562+dhnatiuk1@users.noreply.github.com>2021-11-03 02:19:48 +0200
committerGitHub <noreply@github.com>2021-11-03 09:19:48 +0900
commit05dec28345ebed16a4a39fea85848c0b8b907c05 (patch)
treecd180b098186bcd7d4247c656547037cc4b310c3
parent9fba07b326eb90e1864848b2c8244f6203f4209a (diff)
downloadDLT-daemon-05dec28345ebed16a4a39fea85848c0b8b907c05.tar.gz
Forcibly the severity level set (#346)
Some QNX components when bringing up send messages of severity type "FATAL" instead of "INFO" via slogger2. QNX component send messages of payload data_type = SLOG2_TYPE_ONLINE. The buffer is new and just came online. dlt-qnx-slogger2 does not support info->data_type = SLOG2_TYPE_ONLINE and therefore sets the wrong log level. This commit forcibly change the severity level for all info->data_type = SLOG2_TYPE_ONLINE to SLOG2_INFO. Signed-off-by: Dinidrol <vamovitch@gmail.com>
-rw-r--r--src/dlt-qnx-system/dlt-qnx-slogger2-adapter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dlt-qnx-system/dlt-qnx-slogger2-adapter.cpp b/src/dlt-qnx-system/dlt-qnx-slogger2-adapter.cpp
index 5ebfc0c..2bfd7c9 100644
--- a/src/dlt-qnx-system/dlt-qnx-slogger2-adapter.cpp
+++ b/src/dlt-qnx-system/dlt-qnx-slogger2-adapter.cpp
@@ -137,6 +137,9 @@ static int sloggerinfo_callback(slog2_packet_info_t *info, void *payload, void *
if (param == NULL)
return -1;
+ if (info->data_type == SLOG2_TYPE_ONLINE)
+ info->severity = SLOG2_INFO;
+
DltLogLevelType loglevel;
switch (info->severity)
{