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

Why not rotate to overwrite old log messages but to return DLT_RETURN_BUFFER_FULL when the ring-buffer is full #377

Closed
caiyuexiang opened this issue May 16, 2022 · 2 comments

Comments

@caiyuexiang
Copy link

In dlt_user.c, function: dlt_user_log_out_error_handling, it will store log message in ring buffer if an error accured when failed to sending message to dlt daemon, and if the ring buffer is full, it will return DLT_RETURN_BUFFER_FULL and discard new messages.

What I'm confused about is the implementation is inconsistent with the description in the documentation dlt_design_specification.md, which is:
"- If the message could not be sent, store the message to a local ring buffer.
The ring buffer internally uses a variable length for the buffered elements,
and therefore uses the memory available for the buffer the best way possible.
If the buffer is full, the oldest messages are silently discarded, until
there is enough space for the message to be stored in the ring buffer.
"

Did i miss something?
Any help here would be appreciated, Thank you

@cumtsmart
Copy link

I meet the same question. When i want to dump the last 2 minutes dlt log from ringbuffer, I found that ringbuffer will discard new coming dlt log when exceeding RingbufferMaxSize.

@minminlittleshrimp
Copy link
Collaborator

Answer: #533
To-do: Correct the document

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

3 participants