COVESA/dlt-daemon

storage loglevel is not update using dlt-control

Closed this issue · 8 comments

I want to be able to change storage loglevel using dlt-control so that it is possible to both increase and decrease the storage loglevel.
As of now I doesn't seems to change at all only context->loglevel for which I suspect is used in the online logs.

Hello @drdevil080
thanks for your dropping report here.

I have checked and it seems that everything is fine for changing log level with dlt-control.
I am not so sure about changing log level within logstorage, do you mean changing the log level in FILTER? If that is what you want to mention, I would say that you cannot do that, due to the current implementation, all filters will be parsed into internal Data structure and not receive any runtime values after that.

Please clarify for me your case in detail.
Thank you

Hello,
thank you, could you please create a PR for reviewing?
Regards

Hi Minh

Hello @drdevil080
Could you kindly provide us:

+ Test steps
+ dlt.conf
+ dlt_logstorage.conf

We need more info to reproduce this issue.
Thank you in advance.

Hi @drdevil080
Which use case do you want to change logstorage log level via dlt-control?
Why is it important for you?
Thank you in advance.

Hi @drdevil080
You can change dlt_logstorage.conf and then re run dlt-logstorage-ctrl. In this time, dlt-daemon will reload the dlt_logstorage.conf and you can change the storage log level. The below is my example. I hope that this way is helpful for you.

Step1: Update dlt_logstorage.conf with log level that you want to change

[General]
MaintainLogstorageLogLevel=OFF
[FILTER1]
LogAppName=LOG
ContextName=TEST
LogLevel=DLT_LOG_ERROR
File=test
FileSize=50000
NOFiles=5

Step2: Trigger DLT Daemon to use the new logstorage configuration:
dlt-logstorage-ctrl -c 1 -p /var/dltlogs/

Step 3: Monitor that dlt-daemon upload the dlt_logstorage.conf or not. The dlt-daemon log will show log as below if dlt_logstorage reload successfully.

43821.083826]~DLT~232944~WARNING  ~Entry does not exist in section: ExcludedLogAppName
[43821.083829]~DLT~232944~WARNING  ~Entry does not exist in section: ExcludedContextName
[43821.083832]~DLT~232944~WARNING  ~Entry does not exist in section: SyncBehavior
[43821.083842]~DLT~232944~WARNING  ~Entry does not exist in section: OverwriteBehavior
[43821.083843]~DLT~232944~WARNING  ~Entry does not exist in section: EcuID
[43821.083844]~DLT~232944~WARNING  ~Entry does not exist in section: SpecificSize
[43821.083854]~DLT~232944~WARNING  ~Entry does not exist in section: GzipCompression

Step4: Use cmd "watch -n 1 ls -al" to check the storage log.

Best Reagards,
Dao Nguyen

Closed due to the request violating Autosar standard.
Also, the reporter's account is removed.