summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYusuke Sato <yusuke-sato@apn.alpine.co.jp>2018-05-23 22:39:07 +0900
committerChristoph Lipka <clipka@users.noreply.github.com>2018-05-23 15:39:07 +0200
commitd2a0785be4c5a8a9cf6ec72337c021c43f0c6818 (patch)
tree5b2e3ea94ae567bf3c2038321b5349772cd97ca8 /src
parentd8852d54c336d693e1bcc0eb2fc0e3064f09f4b4 (diff)
downloadDLT-daemon-d2a0785be4c5a8a9cf6ec72337c021c43f0c6818.tar.gz
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 <yusuke-sato@apn.alpine.co.jp>
Diffstat (limited to 'src')
-rw-r--r--src/daemon/dlt-daemon.c16
1 files changed, 11 insertions, 5 deletions
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);
}
}