[genivi-dlt] DLT LogMode extension

Lipka, Christoph (ADITJ/SWG) clipka at jp.adit-jv.com
Fri May 20 04:07:39 EDT 2016

Hi Alex,

We already provided a patch to dlt-control application to have this: http://git.projects.genivi.org/?p=dlt-daemon.git;a=commit;h=a966393ad7003d02870bceffa08df5ddf4bbf864
I think it is more clean to have this functionality in dlt control applications instead of dlt user applications.
The following commands are added to dlt-control, including the possibility to be more flexible:

+    printf("  -l loglevel      Set the log level (0=off - 6=verbose default= -1)\n");
+    printf("      supported options:\n");
+    printf("       -l level -a appid -c ctid\n");
+    printf("       -l level -a abc* (set level for all ctxts of apps name starts with abc)\n");
+    printf("       -l level -a appid (set level for all ctxts of this app)\n");
+    printf("       -l level -c xyz* (set level for all ctxts whose name starts with xyz)\n");
+    printf("       -l level -c ctxid (set level for the particular ctxt)\n");
+    printf("       -l level (set level for all the registered contexts)\n");

So with dlt-control -l 0 you can switch off logging completely.

I will provide the code for the "MessageFilter" hopefully end of next week.

Best regards

Christoph Lipka
Software Group (ADITJ/SWG)

Tel. +81-(0)566 61-5124

From: genivi-diagnostic-log-and-trace-bounces at lists.genivi.org [mailto:genivi-diagnostic-log-and-trace-bounces at lists.genivi.org] On Behalf Of Alexander.AW.Wenzel at bmw.de
Sent: Friday, May 20, 2016 4:54 PM
To: Lipka, Christoph (ADITJ/SWG); genivi-diagnostic-log-and-trace at lists.genivi.org
Subject: Re: [genivi-dlt] DLT LogMode extension

Hello Christoph,

The overall idea looks good.

The API "dlt_det_log_mode" is used to disable the logging at all, e.g. by a diagnostic command. Something similar I think we still need, perhaps with some limited access restriction.

Best regards


BMW Group
Alexander Wenzel
Architect. Connected Drive, I and C Syst.

80788 München

Tel: +49-89-382-54199
Mail: alexander.aw.wenzel at bmw.de<mailto:alexander.aw.wenzel at bmw.de>
Web: http://www.bmwgroup.com/
Bayerische Motoren Werke Aktiengesellschaft
Vorstand: Harald Krüger (Vorsitzender),
Milagros Caiña Carreiro-Andree, Klaus Draeger,
Friedrich Eichiner, Klaus Fröhlich, Ian Robertson,
Peter Schwarzenbauer, Oliver Zipse.
Vorsitzender des Aufsichtsrats: Norbert Reithofer
Sitz und Registergericht: München HRB 42243
Von: genivi-diagnostic-log-and-trace-bounces at lists.genivi.org<mailto:genivi-diagnostic-log-and-trace-bounces at lists.genivi.org> [mailto:genivi-diagnostic-log-and-trace-bounces at lists.genivi.org]<mailto:[mailto:genivi-diagnostic-log-and-trace-bounces at lists.genivi.org]> Im Auftrag von Lipka, Christoph (ADITJ/SWG)
Gesendet: Montag, 16. Mai 2016 04:43
An: genivi-diagnostic-log-and-trace at lists.genivi.org<mailto:genivi-diagnostic-log-and-trace at lists.genivi.org>
Betreff: [genivi-dlt] DLT LogMode extension

Dear all,

We like to propose an extension to the DLT LogMode. Currently, the DLT Daemon consists of 4 modes (OFF, INTERNAL, EXTERNAL, BOTH). This is very static and does not allow any further configuration which is needed from our point of view. Furthermore, the LogMode can be changed by every application using the "dlt_set_log_mode" API. It is not a good idea to let any application change the general behavior of the DLT Daemon - so we propose to remove this API (or at least disable it in some way to overcome this problem).

The proposed message filter works in two directions:
- filter the forwarding of log messages to different connected DLT Clients (Offline Trace, Offline Logstorage, DLT Viewer connected via TCP or serial connections).
- filter incoming control and injection messages

Currently, when EXTERNAL or BOTH is specified, all incoming control and injection messages are handled by the DLT Daemon, but we have the requirement to allow only specific ones. Therefore, we propose to add a configuration file which is read by the DLT Daemon during startup. The following describes the current LogMode. If no message filter configuration is specified, this is used by default:

Name         = Genivi-LogMode
DefaultLevel    = 75

Name         = Off
Level         = 0
Clients        = NONE
ControlMessages = NONE
Injections      = NONE

Name         = Internal
Level          = 25
Clients         = TRACE, LOGSTORAGE
ControlMessages = NONE
Injections      = NONE

Name         = External
Level         = 50
Clients        = Serial, TCP
ControlMessages = *
Injections      = *

Name         = Both
Level         = 100
Clients        = *
ControlMessages = *
Injections      = *

Having a configuration file like this, you can add another filter configuration to allow only specific control and injection messages without any source code changes, e.g.

Name         = TrustedControl
Level         = 90
Clients        = *
ControlMessages = 0x03, 0x13 // allow only get log info and get software version control messages
Injections      = i1                  // allow only specified injections, list and wildcard will be possible

The injection message has to be specified:
Name            = i1
LogAppName      = LOG
ContextName      = TEST
NodeID          = ECU1 // makes sense only for MultiNode
ServiceID         = 4096 // list and wildcard will be possible

If the DLT Daemon is in such a mode and receives a not allowed control message, it will send a "PERMISSION_DENIED" response. Of course, the DLT Viewer need a little modification to understand this.
Furthermore, there will be an control application to change the filter configuration and display the current message filter status.

We will provide source code within a couple of days, but want to use the time in between to start some discussion. So if you already have any questions regarding the concept, please let me know.

Best regards

Christoph Lipka
Advanced Driver Information Technology
Software Group (ADITJ/SWG)
1-1 Showa-cho, Kariya-shi
Aichi-ken 448-8661, Japan
Tel. +81-(0)566 61-5124
Fax +81-(0)566 25-4774
clipka at jp.adit-jv.com<mailto:clipka at jp.adit-jv.com>

ADIT is joint venture company of DENSO Corporation and Bosch GmbH

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genivi.org/pipermail/genivi-diagnostic-log-and-trace_lists.genivi.org/attachments/20160520/f39d728e/attachment.html>

More information about the genivi-diagnostic-log-and-trace mailing list