[genivi-dlt] [dlt-daemon] Feature inquiry

Alexander.AW.Wenzel at bmw.de Alexander.AW.Wenzel at bmw.de
Tue May 3 12:25:06 EDT 2016


Hello,

I think I have fixed the issue. I will send patch after internal review.
This was quiet complicated.

Best regards

    Alex

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

Postanschrift:
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] Im Auftrag von Alexander.AW.Wenzel at bmw.de
Gesendet: Dienstag, 3. Mai 2016 15:27
An: hj.ha at lge.com; stefan.vacek at intel.com
Cc: genivi-diagnostic-log-and-trace at lists.genivi.org; sh1.yun at lge.com
Betreff: Re: [genivi-dlt] [dlt-daemon] Feature inquiry

Hello Hongjeon,

I have retested this issue and you are right. Looks like the whole default log level stuff is not working anymore.
Your fix will solve this issue, but you will have new issues then.

I identified the commit, where the problem came in:

Revision: c3b53f8805236cb7c72eb62ef04866f34de33103
Author: Stefan Vacek <stefan.vacek at intel.com<mailto:stefan.vacek at intel.com>>
Date: 26.08.2015 17:28:54
Message:
Add env-var to set initial log-levels

Normally the user library sends a message with log level not set, the following was the original code:

                if (loglevel!=DLT_USER_LOG_LEVEL_NOT_SET)
                {
                                log.log_level = loglevel;
                }
                else
                {
                                log.log_level = DLT_USER_LOG_LEVEL_NOT_SET;
                }

                if (tracestatus!=DLT_USER_TRACE_STATUS_NOT_SET)
                {
                                log.trace_status = tracestatus;
                }
                else
                {
                                log.trace_status = DLT_USER_TRACE_STATUS_NOT_SET;
                }

Now we have this:

  log.log_level = dlt_user.dlt_ll_ts[dlt_user.dlt_ll_ts_num_entries].log_level;
  log.trace_status = dlt_user.dlt_ll_ts[dlt_user.dlt_ll_ts_num_entries].trace_status;

That’s wrong. The used log level at the beginning and the send log level to daemon must be different, if default log level will be used. Not set must be send to daemon, if no log level is set by environement variable.

@Stefan: Do you have a solution here?

Best regards

     Alex

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

Postanschrift:
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: 하홍전 (Hongjeon Ha) [mailto:hj.ha at lge.com]
Gesendet: Mittwoch, 27. April 2016 07:54
An: Wenzel Alexander, EE-60 <Alexander.AW.Wenzel at bmw.de<mailto:Alexander.AW.Wenzel at bmw.de>>
Cc: sh1.yun at lge.com<mailto:sh1.yun at lge.com>; Wirschal Gernot, EE-60 <Gernot.Wirschal at bmw.de<mailto:Gernot.Wirschal at bmw.de>>; genivi-diagnostic-log-and-trace at lists.genivi.org<mailto:genivi-diagnostic-log-and-trace at lists.genivi.org>
Betreff: Re: AW: [dlt-daemon] Feature inquiry


Hello, Alexander.

I considered this issue little bit more. My first patch was wrong. :(

Anyway, the problem is the flag "ContextLogLevel" which is described in dlt.conf does not work.
In other words, log level for new contexts will be INFO regardless of the "ContextLogLevel".

A new context's log level is set as initial value. Please, refer codes below. (dlt_user.c:889)
------------------------------------------------------------------------------------
dlt_user.dlt_ll_ts[i].log_level    = DLT_USER_INITIAL_LOG_LEVEL;
------------------------------------------------------------------------------------
DLT_USER_INITIAL_LOG_LEVEL is 0x04.

And then dlt_daemon_user_send_log_level() checks that which level is set at context->log_level.
Now, context->log_level is 0x04, but the code compares with DLT_LOG_DEFAULT(-1).
So, usercontext.log_level is always 0x04(info). (dlt_daemon_common.c:1131)
------------------------------------------------------------------------------------
else /* Storage log level is not updated (is DEFAULT) then  no device is yet connected so ignore */
{
    usercontext.log_level = ((context->log_level == DLT_USER_INITIAL_LOG_LEVEL)?daemon->default_log_level:context->log_level);
}
------------------------------------------------------------------------------------

I attached a new patch file for this issue.

Thanks.

HONGJEON HA
Senior Research Engineer | Software Platform Development Department
SW Platform Engineering Division | IVI Business Unit
Vehicle Components Company | LG Electronics Inc.
Mobile : 82-10-3888-9167, e-mail : hj.ha at lge.com<mailto:hj.ha at lge.com>

[cid:image001.jpg at 01D1A569.1D4D0130]


2016-04-26 오후 8:22에 Alexander.AW.Wenzel at bmw.de<mailto:Alexander.AW.Wenzel at bmw.de> 이(가) 쓴 글:
Hello Hongjeon,

I think your patch is not correct. Normally a log level DLT_LOG_DEFAULT is registered for the context in the DLT daemon and latter in this function dlt_daemon_user_send_log_level(daemon, context, verbose) is called with the default log level.

And here it is set by command line:

    if (dlt_daemon_init(daemon,daemon_local->RingbufferMinSize,daemon_local->RingbufferMaxSize,daemon_local->RingbufferStepSize, daemon_local->flags.ivalue,daemon_local->flags.contextLogLevel, daemon_local->flags.contextTraceStatus,daemon_local->flags.enforceContextLLAndTS,daemon_local->flags.vflag)==-1)

If it does not work for you please check if there is another possible problem.

If you identified an issue and have patches please send to genivi-diagnostic-log-and-trace at lists.genivi.org<mailto:genivi-diagnostic-log-and-trace at lists.genivi.org>.

Thanks for reporting

                Alex

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

Postanschrift:
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: 하홍전 (Hongjeon Ha) [mailto:hj.ha at lge.com]
Gesendet: Dienstag, 26. April 2016 06:06
An: Wenzel Alexander, EE-60 <Alexander.AW.Wenzel at bmw.de><mailto:Alexander.AW.Wenzel at bmw.de>
Cc: 윤성훈/책임연구 원/IVI SW플랫폼개 발2팀(sh1.yun at lge.com<mailto:sh1.yun at lge.com>) <sh1.yun at lge.com><mailto:sh1.yun at lge.com>
Betreff: [dlt-daemon] Feature inquiry


Hi, Mr. Alexander.

I'm developing some components and using dlt-daemon on our IVI system.
I would like to fix initial log level greater than info level and modified the "ContextLogLevel" and the "ContextTraceStatus" on dlt.conf, but it'll not going to happen.
So, I attach the patch file about above problem.
Could you consider the patch file for me?

Thanks.

HONGJEON HA
Senior Research Engineer | Software Platform Development Department
SW Platform Engineering Division | IVI Business Unit
Vehicle Components Company | LG Electronics Inc.
Mobile : 82-10-3888-9167, e-mail : hj.ha at lge.com<mailto:hj.ha at lge.com>

[mailbox:///D:/Thunderbird/e8mpuo50.default/Mail/lgekrhqms01.lge.com/Inbox.sbd/01_SWP?number=142872706&header=quotebody&part=1.2&filename=image001.jpg]



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genivi.org/pipermail/genivi-diagnostic-log-and-trace_lists.genivi.org/attachments/20160503/6d328c45/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 89033 bytes
Desc: image001.jpg
URL: <http://lists.genivi.org/pipermail/genivi-diagnostic-log-and-trace_lists.genivi.org/attachments/20160503/6d328c45/attachment.jpg>


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