Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dlt-user-example can't save dlt message to local log file instead of sending to daemon #705

Open
KooWu opened this issue Nov 14, 2024 · 6 comments

Comments

@KooWu
Copy link

KooWu commented Nov 14, 2024

./dlt-example-user -f helloworld.dlt -S 1000 HelloWorld
[ 7833.441407]DLT151647~ERROR ~dlt_set_filesize_max: Library is not configured to log to file

@8vp
Copy link

8vp commented Nov 14, 2024

Did you enable the offline log storage in the dlt.conf file and also have the dlt filter config file in the location you want to store?

@KooWu
Copy link
Author

KooWu commented Nov 15, 2024

Did you enable the offline log storage in the dlt.conf file and also have the dlt filter config file in the location you want to store?

Thank you,Can you provide a reference configuration based on this example?

@Bichdao021195
Copy link
Contributor

Bichdao021195 commented Nov 20, 2024

@KooWu
In my end, i can run dlt-example-user to log to local file as normally .
Can you provide specific context that you face with error : [ 7833.441407]DLT151647~ERROR ~dlt_set_filesize_max: Library is not configured to log to ?
Testing in my local:

nad8hc@nad8hc-VirtualBox:~$ dlt-example-user -f helloworld.dlt -S 1000 HelloWorld
Send 0 HelloWorld
[23505.141995]~DLT~58321~WARNING  ~dlt_user_log_write_int dlt_user_init_state != INIT_DONE
[23505.142001]~DLT~58321~WARNING  ~dlt_user_log_write_sized_string_utils_attr dlt_user_init_state != INIT_DONE
[23505.142003]~DLT~58321~WARNING  ~dlt_user_log_send_log dlt_user_init_state != INIT_DONE
Send 1 HelloWorld
[23505.650232]~DLT~58321~WARNING  ~dlt_user_log_write_int dlt_user_init_state != INIT_DONE
[23505.650236]~DLT~58321~WARNING  ~dlt_user_log_write_sized_string_utils_attr dlt_user_init_state != INIT_DONE
[23505.650238]~DLT~58321~WARNING  ~dlt_user_log_send_log dlt_user_init_state != INIT_DONE
Send 2 HelloWorld
[23506.156397]~DLT~58321~WARNING  ~dlt_user_log_write_int dlt_user_init_state != INIT_DONE
[23506.156402]~DLT~58321~WARNING  ~dlt_user_log_write_sized_string_utils_attr dlt_user_init_state != INIT_DONE
[23506.156404]~DLT~58321~WARNING  ~dlt_user_log_send_log dlt_user_init_state != INIT_DONE
Send 3 HelloWorld
[23506.656979]~DLT~58321~WARNING  ~dlt_user_log_write_int dlt_user_init_state != INIT_DONE
[23506.656982]~DLT~58321~WARNING  ~dlt_user_log_write_sized_string_utils_attr dlt_user_init_state != INIT_DONE
[23506.656984]~DLT~58321~WARNING  ~dlt_user_log_send_log dlt_user_init_state != INIT_DONE
Send 4 HelloWorld
[23507.163374]~DLT~58321~WARNING  ~dlt_user_log_write_int dlt_user_init_state != INIT_DONE
[23507.163379]~DLT~58321~WARNING  ~dlt_user_log_write_sized_string_utils_attr dlt_user_init_state != INIT_DONE
[23507.163380]~DLT~58321~WARNING  ~dlt_user_log_send_log dlt_user_init_state != INIT_DONE
Send 5 HelloWorld
[23507.668700]~DLT~58321~WARNING  ~dlt_user_log_write_int dlt_user_init_state != INIT_DONE
[23507.668704]~DLT~58321~WARNING  ~dlt_user_log_write_sized_string_utils_attr dlt_user_init_state != INIT_DONE
[23507.668705]~DLT~58321~WARNING  ~dlt_user_log_send_log dlt_user_init_state != INIT_DONE
Send 6 HelloWorld
[23508.169041]~DLT~58321~WARNING  ~dlt_user_log_write_int dlt_user_init_state != INIT_DONE
[23508.169045]~DLT~58321~WARNING  ~dlt_user_log_write_sized_string_utils_attr dlt_user_init_state != INIT_DONE
[23508.169047]~DLT~58321~WARNING  ~dlt_user_log_send_log dlt_user_init_state != INIT_DONE
Send 7 HelloWorld
[23508.674691]~DLT~58321~WARNING  ~dlt_user_log_write_int dlt_user_init_state != INIT_DONE
[23508.674695]~DLT~58321~WARNING  ~dlt_user_log_write_sized_string_utils_attr dlt_user_init_state != INIT_DONE
[23508.674697]~DLT~58321~WARNING  ~dlt_user_log_send_log dlt_user_init_state != INIT_DONE
Send 8 HelloWorld
[23509.174942]~DLT~58321~WARNING  ~dlt_user_log_write_int dlt_user_init_state != INIT_DONE
[23509.174946]~DLT~58321~WARNING  ~dlt_user_log_write_sized_string_utils_attr dlt_user_init_state != INIT_DONE
[23509.174949]~DLT~58321~WARNING  ~dlt_user_log_send_log dlt_user_init_state != INIT_DONE
Send 9 HelloWorld
[23509.679034]~DLT~58321~WARNING  ~dlt_user_log_write_int dlt_user_init_state != INIT_DONE
[23509.679038]~DLT~58321~WARNING  ~dlt_user_log_write_sized_string_utils_attr dlt_user_init_state != INIT_DONE
[23509.679040]~DLT~58321~WARNING  ~dlt_user_log_send_log dlt_user_init_state != INIT_DONE
[23511.185633]~DLT~58321~WARNING  ~dlt_unregister_app_util dlt_user_init_state != INIT_DONE
[23511.185680]~DLT~58321~WARNING  ~dlt_user_atexit_handler dlt_user_init_state != INIT_DONE
nad8hc@nad8hc-VirtualBox:~$ ls hello*
helloworld.dlt

@lti9hc
Copy link
Collaborator

lti9hc commented Nov 20, 2024

Hello @KooWu,
are you still getting above error?

@KooWu
Copy link
Author

KooWu commented Nov 20, 2024

@Bichdao021195

./dlt-example-user -f helloworld.dlt -S 1000 HelloWorld

It's strange that there's no such problem now, but the generated dlt file is empty

[28289.096594]DLT573752~WARNING dlt_user_log_write_int dlt_user_init_state != INIT_DONE
[28289.096610]DLT573752
WARNING dlt_user_log_write_sized_string_utils_attr dlt_user_init_state != INIT_DONE
[28289.096618]DLT573752
WARNING dlt_user_log_send_log dlt_user_init_state != INIT_DONE
[28290.597018]DLT573752
WARNING dlt_unregister_app_util dlt_user_init_state != INIT_DONE
[28290.597085]DLT573752
WARNING ~dlt_user_atexit_handler dlt_user_init_state != INIT_DONE
$ ls -l helloworld.dlt
-rw-r--r-- 1 yaoxingwei0382 yaoxingwei0382 0 Nov 20 19:59 helloworld.dlt

@KooWu
Copy link
Author

KooWu commented Nov 20, 2024

Hello @KooWu, are you still getting above error?

There is no longer this issue. After the program runs automatically, the file that generates the dlt is empty
The example of the app storing files on its own is not clear enough, while the example of sending files to dlt daemon for storage is clearer
I feel like the app needs to store the examples separately and not make them too complicated
When dlt daemon stores files and enables compression, it cannot be configured to on_stypesize mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants