[genivi-dlt] dlt-daemon: dlt-viewer: No LOG_DEBUG messages

Lipka, Christoph (ADITJ/SWG) clipka at jp.adit-jv.com
Tue Sep 6 21:13:39 EDT 2016


Hi Michael,

Basically the problem is that the program runs too fast.
The user library initial value is LOG_INFO and your program ends before it receives the log level update from dlt daemon, which you configured correctly with

-# ContextLogLevel = 4
+ContextLogLevel = 5

The other option is for internal daemon logging.

So you have 2 options to solve the problem:

Change the code to register the context with your preferred log level directly:
Use DLT_REGISTER_CONTEXT_LL_TS(CONTEXT,CONTEXTID,DESCRIPTION,LOGLEVEL,TRACESTATUS) instead of DLT_REGISTER_CONTEXT(CONTEXT,CONTEXTID,DESCRIPTION)

Or set an environment variable:
export DLT_INITIAL_LOG_LEVEL="EXA1:CON:5" // 5 -> LOG_LEVEL_DEBUG
 
Afterwards, it works as expected. Please let me know if this solves your problem.

Best regards

Christoph Lipka
Software Group (ADITJ/SWG)

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


-----Original Message-----
From: genivi-diagnostic-log-and-trace [mailto:genivi-diagnostic-log-and-trace-bounces at mailman1.genivi.org] On Behalf Of Michael Hornung
Sent: Tuesday, September 06, 2016 4:39 PM
To: genivi-diagnostic-log-and-trace at mailman1.genivi.org
Subject: [genivi-dlt] dlt-daemon: dlt-viewer: No LOG_DEBUG messages

Hi,

I downloaded dlt-daemon from git and build it as described inside the INSTALL file:

$ git clone git://git.projects.genivi.org/dlt-daemon.git
$ cd dlt-daemon
$ mkdir build
$ cd build
$ cmake ..
$ make

I finally started it with the default configuration file:

$ ./dlt-daemon -c ../../../src/daemon/dlt.conf

Then I did the following changes to "examples/example1/example1.c":

examples/example1/example1.c
-       DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_STRING("Hello world!"));
+       DLT_LOG(con_exa1,DLT_LOG_DEBUG,DLT_STRING("Hello world!"));

and compiled it as follows:

$ cd dlt-daemon/examples/example1
$ gcc -o example1 -I../../include/dlt example1.c -L../../build/src/lib/ -ldlt

I finally started it with the following command:

$ LD_LIBRARY_PATH=../../build/src/lib/:$LD_LIBRARY_PATH ./example1

In parallel, I watched the dlt-viewer window (Default Log Level set to
"debug") and got the following output:

84 2016/09/06 09:30:57.275109 2165.5353 1 ECU1 DLTD INTM 3766 log info verbose 1 ApplicationID 'EXA1' registered for PID 3823, Description=First Example
85 2016/09/06 09:30:57.275113 2165.5354 2 ECU1 DLTD INTM 3766 log info verbose 1 ContextID 'CON' registered for ApID 'EXA1', Description=First context
86 2016/09/06 09:30:57.275116 2165.5355 0 ECU1 DA1 DC1 0 control response non-verbose 0 [get_log_info 7] 01 00 45 58 41 31 01 00 43 4f 4e 00 ff ff 0d 00 46 69 72 73 74 20 63 6f 6e 74 65 78 74 0d 00 46 69
72 73 74 20 45 78 61 6d 70 6c 65 72 65 6d
87 2016/09/06 09:30:57.275216 2165.5404 3 ECU1 DLTD INTM 3766 log info verbose 1 Unregistered CtID 'CON' for ApID 'EXA1'
88 2016/09/06 09:30:57.275226 2165.5404 0 ECU1 DA1 DC1 0 control response non-verbose 0 [unregister_context ok] 45 58 41 31 43 4f 4e 00
72 65 6d
89 2016/09/06 09:30:57.275231 2165.5404 4 ECU1 DLTD INTM 3766 log info verbose 1 Unregistered ApID 'EXA1'

The string "Hello world" written to LOG_DEBUG level is missing.

I tried to change the dlt-daemon configuration (/src/daemon/dlt.conf) file as follows with no success:

src/daemon/dlt.conf
-LoggingLevel = 6
+LoggingLevel = 7


src/daemon/dlt.conf
-LoggingLevel = 6
+LoggingLevel = 7

-# ContextLogLevel = 4
+ContextLogLevel = 5


I would really appreciate if someone could explain what I am doing wrong.

With best regards

Michael
_______________________________________________
genivi-diagnostic-log-and-trace mailing list genivi-diagnostic-log-and-trace at mailman1.genivi.org
http://lists.genivi.org/cgi-bin/mailman/listinfo/genivi-diagnostic-log-and-trace


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