change log level of application not work
i am using dlt-control to change some app log level
i have a app registed as "P1" with 1 context and a app registered as "S1" with 3 context
i want S1's 3 context to switch to log_level 2
dlt-control -a S1 -l 2 localhost this not work : apid : P1 ctid: xxx0 apid : S1 ctid: xxx1 apid : S1 ctid: xxx2 apid : S1 ctid: xxx3
if i change "S1" to "O1", this work : dlt-control -a O1 -l 2 localhost apid : O1 ctid: xxx1 apid : O1 ctid: xxx2 apid : O1 ctid: xxx3 apid : P1 ctid: xxx0
in the code src/daemon/dlt_daemon_client.c: dlt_daemon_find_multiple_context_and_send_log_level
looks like with app_flag == 1, if not match, it just break ? since the contexts are sorted,so S > P not work, and O < P work
Hello @SBKK , Sorry for being very late in response. I tried to reproduce with some small modifications on our test binaries: dlt-example-user and dlt-test-multi-process There is no issue can be observed as your description.
$ dlt-control -j -u
Get log info:
APID:P1-- Test Application for Logging
CTID:0000 -1 -1 Test Context for Logging
APID:S1-- Apps S1.
CTID:0001 -1 -1 Child 0001 in dlt-test-multi-process
CTID:0002 -1 -1 Child 0002 in dlt-test-multi-process
CTID:0003 -1 -1 Child 0003 in dlt-test-multi-process
$ dlt-control -a S1 -l 2 localhost
[41175.408703]~DLT~27986~INFO ~dlt_client_send_ctrl_msg: Control message forwarded : DLT_SERVICE_ID_SET_LOG_LEVEL
$ dlt-control -j -u
Get log info:
APID:P1-- Test Application for Logging
CTID:0000 -1 -1 Test Context for Logging
APID:S1-- Apps S1.
CTID:0001 2 -1 Child 0001 in dlt-test-multi-process
CTID:0002 2 -1 Child 0002 in dlt-test-multi-process
CTID:0003 2 -1 Child 0003 in dlt-test-multi-process
$ dlt-control -j -u
Get log info:
APID:P1-- Test Application for Logging
CTID:0000 -1 -1 Test Context for Logging
APID:S1-- Apps S1.
CTID:0001 -1 -1 Child 0001 in dlt-test-multi-process
CTID:0002 -1 -1 Child 0002 in dlt-test-multi-process
CTID:0003 -1 -1 Child 0003 in dlt-test-multi-process
$ dlt-control -a S1 -l 2 localhost
[41906.186320]~DLT~30094~INFO ~dlt_client_send_ctrl_msg: Control message forwarded : DLT_SERVICE_ID_SET_LOG_LEVEL
$ dlt-control -j localhost
Get log info:
[42035.766102]~DLT~30115~INFO ~dlt_client_send_ctrl_msg: Control message forwarded : DLT_SERVICE_ID_GET_LOG_INFO
APID:P1-- Test Application for Logging
CTID:0000 -1 -1 Test Context for Logging
APID:S1-- Apps S1.
CTID:0001 2 -1 Child 0001 in dlt-test-multi-process
CTID:0002 2 -1 Child 0002 in dlt-test-multi-process
CTID:0003 2 -1 Child 0003 in dlt-test-multi-process
Can you please enable log of dlt-daemon, reproduce and share with me (dlt.log file)? How to enable dlt-daemon log (via dlt.conf file)
- LoggingMode =2
- LoggingLevel = 7
- LoggingFilename = /tmp/dlt.log
Thank you, Thanh
Hello @SBKK , Update: We are now able to reproduce the issue. We are working on the fix and will raise PR soon. Regards, Thanh
Hello @SBKK , I have created pull request https://github.com/COVESA/dlt-daemon/pull/408 for this issue I have tested in my side, it works well, Please kindly test in your side Thank you, Tin
Hello @SBKK , #408 is merged and I believe it can help to solve your reported issue. Hence I'd like to close this. Please raise new one in case you find something unexpected. Thank you, Thanh