[genivi-dlt] DLT daemon log level usage?

none none charles.romanescou at gmail.com
Fri May 19 02:29:54 EDT 2017

Thanks, it helps, but I guess I didn't understood the meaning of "log
level" then.

When I'm doing in my application:

DLT_LOG(myContext1,DLT_LOG_ERROR,DLT_STRING("This is a error"));

The log level of this message is going to be ERROR (the subtype column
displayed in dlt_viewer), right?
So, before my application send this log line, if I did:

dlt-control -a APP -c myContext1 -l 6

What does this implies since "This is a error" log log level is
already at DLT_LOG_ERROR? The meaning of DLT_LOG_VERBOSE is lost?
I don't understand the use of dlt-control -l,
sorry (which log-level does it configure? the one in the application,
in the client, in the daemon is there is any? does it set some log
threshold to limit the message delivery to client?)

If we can already set a log level when using DLT_LOG, what is the
point of using dlt-control?
I'm missing something I guess.

Thanks again for the help!

BTW the doc is nice, thanks, and:

$ cmake ../ -DWITH_DOC=ON
$ make -j8  2>&1 | grep FAILED
[ 98%] [100%] asciidoc: FAILED: input file
/home/obigo/opt/tmp/dlt-daemon/README missing
$ cd ../ & cp README.md README && cd build
$ make -j8
[ works fine ]

(sorry for the double mail, didn't send it to the mailing list at first)

On Fri, May 19, 2017 at 2:02 PM, Lipka, Christoph (ADITG/ESA)
<clipka at de.adit-jv.com> wrote:
> Hi,
>> I'm new to DLT and the features are quite nice - thanks for providing this to
>> us!
> Good to hear this.
>> I have a question regarding log level setting in dlt daemon.
>> I saw that the dlt-control program could accept the -l option to set a given log
>> level. I don't understand how this can be effectively used.
>> From what I got reading the source code, it calls the function
>> "dlt_daemon_send_log_level" which calls
>> "dlt_daemon_user_send_log_level" and
>> "dlt_daemon_control_service_response".
>> - the second is just to acknowledge dlt-control that the log level has been set
>> effectively.
>> - the first one logs to FIFO (i.e to the application sending the logs do the
>> client, the application who called  DLT_REGISTER_APP)
>> (src/daemon/dlt_daemon_common.c:1156)
>> Is this correct?
>> If I understood correctly, this means if we we want to use dlt-control, we
>> need to implement a response to dlt_daemon_user_send_log_level (after
>> calling DLT_REGISTER_APP) to only send the right amount of log to dlt
>> daemon afterward? Is there any doc for this, could you point me out to some
>> reference/function/source file please?
> After you registered your application id (e.g. "APP") and context id (e.g. "CON") in your application, you can use dlt-control application to change the log level:
> dlt-control -a APP -c CON -l 6 (for verbose level)
> There is no need to add any code inside your application, the log level is changed automatically. BTW: The initial log level is INFO. If you need another log level directly on application start, you can use an environment variable, e.g. export DLT_INITIAL_LOG_LEVEL=”APP:CON:6”
> If you want your application to execute specific functionality when log level is changed, you can register a callback function:
>> I couldn't find any doc/reference about it. Did I miss something?
> You can build documentation by adding "WITH_DOC=ON" when calling cmake, e.g. cmake .. -DWITH_DOC=ON. You may have to install some dependent packages.
>  > Thanks for the help!
> Hope that helps.
> Best Regards,
> Christoph
> _______________________________________________
> genivi-diagnostic-log-and-trace mailing list
> genivi-diagnostic-log-and-trace at lists.genivi.org
> http://lists.genivi.org/mailman/listinfo/genivi-diagnostic-log-and-trace

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