From d2a0785be4c5a8a9cf6ec72337c021c43f0c6818 Mon Sep 17 00:00:00 2001 From: Yusuke Sato Date: Wed, 23 May 2018 22:39:07 +0900 Subject: dlt-daemon: Not output Context un-/registration DLT message by default (#62) This patch changes Context un-/registration message not to output DLT by default for the purpose of reducing trace messages. Actually dlt-daemon already sends almost same meaning control message which can show Context un-/registration([get_log_info] and [unregister_context]). These are duplicate message and should be suppressed in normal case. Only if "Verbose = 1" is set in dlt.conf, the messages are output as same as before. Signed-off-by: Yusuke Sato --- src/daemon/dlt-daemon.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c index 6611015..8fe4882 100644 --- a/src/daemon/dlt-daemon.c +++ b/src/daemon/dlt-daemon.c @@ -2522,7 +2522,10 @@ int dlt_daemon_process_user_message_register_context(DltDaemon *daemon, context->ctid, context->apid, context->context_description); - dlt_daemon_log_internal(daemon, daemon_local, local_str, verbose); + if (verbose) + { + dlt_daemon_log_internal(daemon, daemon_local, local_str, verbose); + } dlt_log(LOG_DEBUG, local_str); } @@ -2752,10 +2755,13 @@ int dlt_daemon_process_user_message_unregister_context(DltDaemon *daemon, "Unregistered CtID '%.4s' for ApID '%.4s'\n", userctxt.ctid, userctxt.apid); - dlt_daemon_log_internal(daemon, - daemon_local, - local_str, - verbose); + if (verbose) + { + dlt_daemon_log_internal(daemon, + daemon_local, + local_str, + verbose); + } dlt_log(LOG_DEBUG, local_str); } } -- cgit v1.2.1