-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix formatting of long log messages #30
Conversation
Requires HMIProject/open62541-sys#10. |
@uklotzde I published open62541-sys@0.2.2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems alright. One difference seems to be that for long messages, the previous code would truncate with "…" inside the largest allowed buffer while the current code now bails out early when working on the small buffer, truncating the message at shorter buffer size than necessary.
You can see the difference with
const FORMAT_MESSAGE_DEFAULT_BUFFER_LEN: usize = 10;
const FORMAT_MESSAGE_MAXIMUM_BUFFER_LEN: usize = 100;
I would expect most messages to have 99 characters but most have only 9.
Co-authored-by: Sebastian Goll <1277035+sgoll@users.noreply.github.com>
Fixes #29.