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

Improve LoggingModule to allow the user to send long messages #199

Open
zenker opened this issue Oct 29, 2020 · 0 comments
Open

Improve LoggingModule to allow the user to send long messages #199

zenker opened this issue Oct 29, 2020 · 0 comments
Assignees

Comments

@zenker
Copy link
Collaborator

zenker commented Oct 29, 2020

At the moment the module assumes that the message does not include the new line character. It uses the new line character to split the tail into the individual messages and to remove old messages from the tail depending on the tail size set by the user.

In principle the user should not use multiple lines but send individual messages. I just realised that this causes a problem. If the user sends more than 3 messages subsequently messages are lost. This is because the LoggingModule can not finish processing the messages fast enough to free up the ring buffer internally used by CTK. At if there is no free slot in the internal CTK buffer new data is dropped.

This is a fundamental problem of the LoggingModule and can only be solved if the user can send multiple lines at once using the new line character.
One could use a vector of str::string for implementing the message buffer and construct the tail every time a new message is added from the vector. The vector size is defined by the tail length and the vector is rotated with every new message.

@zenker zenker self-assigned this Oct 29, 2020
@mhier mhier changed the title Improove LoggingModule to allow the user to send long messages Improve LoggingModule to allow the user to send long messages Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant