Skip to content

Improve robustness when logging large message strings#593

Merged
swebb2066 merged 10 commits intomasterfrom
improve_large_string_handling
Feb 12, 2026
Merged

Improve robustness when logging large message strings#593
swebb2066 merged 10 commits intomasterfrom
improve_large_string_handling

Conversation

@swebb2066
Copy link
Copy Markdown
Contributor

This PR replaces #584 by providing a more comprehensive approach when the application tries to log a very large string message

void FormattingInfo::format(const int fieldStart, LogString& buffer) const
{
int rawLength = int(buffer.length() - fieldStart);
if (INT_MAX < buffer.length())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this always going to be true? or am I misreading it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait no I'm misreading it, nevermind. The comparison is backwards from what I would typically do(if buffer.length() > INT_MAX)

@swebb2066 swebb2066 merged commit e20cab0 into master Feb 12, 2026
34 checks passed
@swebb2066 swebb2066 deleted the improve_large_string_handling branch February 12, 2026 23:01
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

Successfully merging this pull request may close these issues.

3 participants