[genivi-dlt] DLT daemon log level usage?

Lipka, Christoph (ADITG/ESA) clipka at de.adit-jv.com
Fri May 19 01:02:05 EDT 2017

> 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,

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