summaryrefslogtreecommitdiff
path: root/src/daemon/dlt_daemon_common.c
diff options
context:
space:
mode:
authorSaya Sugiura <ssugiura@jp.adit-jv.com>2020-12-08 10:22:42 +0900
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2021-01-06 09:27:28 +0900
commit635a94e141d3c0d73130069e979f4bb63d464c1d (patch)
treea5da5318c3cf7ea2ed44c35893aa134ebe7f9a39 /src/daemon/dlt_daemon_common.c
parent4eb5be749b23081d2c92680d2a481e36f7ac0685 (diff)
downloadDLT-daemon-635a94e141d3c0d73130069e979f4bb63d464c1d.tar.gz
logstorage: Implement general config to maintain logstorage loglevel
Runtime log level setting from dlt-viewer or dlt-control doesn't work when logstorage is enabled. Adding MaintainLogstorageLogLevel=ON/OFF to [General] session of dlt_logstorage.conf to keep the current behaviour (=ON or 1 or not defined), or allow to change log level from dlt-viewer or dlt-control when the logstorage is enabled (=OFF or 0). Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com> Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
Diffstat (limited to 'src/daemon/dlt_daemon_common.c')
-rw-r--r--src/daemon/dlt_daemon_common.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/daemon/dlt_daemon_common.c b/src/daemon/dlt_daemon_common.c
index cff1a9e..35ad9d6 100644
--- a/src/daemon/dlt_daemon_common.c
+++ b/src/daemon/dlt_daemon_common.c
@@ -1354,9 +1354,10 @@ int dlt_daemon_user_send_log_level(DltDaemon *daemon, DltDaemonContext *context,
return -1;
}
- if (context->storage_log_level != DLT_LOG_DEFAULT)
- usercontext.log_level = context->log_level >
- context->storage_log_level ? context->log_level : context->storage_log_level;
+ if ((context->storage_log_level != DLT_LOG_DEFAULT) &&
+ (daemon->maintain_logstorage_loglevel != DLT_MAINTAIN_LOGSTORAGE_LOGLEVEL_OFF))
+ usercontext.log_level = context->log_level >
+ context->storage_log_level ? context->log_level : context->storage_log_level;
else /* Storage log level is not updated (is DEFAULT) then no device is yet connected so ignore */
usercontext.log_level =
((context->log_level == DLT_LOG_DEFAULT) ? daemon->default_log_level : context->log_level);