Skip to content

Conversation

@bryanatkinson
Copy link
Contributor

There's no guarantee each character is exactly 2 bytes, so our previous truncation logic did not work for large messages containing a lot of unicode characters.

Although @google-cloud/logging-winston uses the default maxEntrySize of 250k, when all of those characters are in a single json field, it was still not truncating.

Checklist (if applicable):

  • Tested (manually, unit tested, etc.)
  • Changelog updated
  • Docs updated
…arantee each character is exactly 2 bytes, so our previous truncation logic did not work for large messages containing a lot of unicode characters.

Although @google-cloud/logging-winston uses the default maxEntrySize of 250k, when all of those characters are in a single json field, it was still not truncating.
@bryanatkinson bryanatkinson merged commit 09014eb into main Sep 19, 2024
@bryanatkinson bryanatkinson deleted the bryanatkinson-log-length branch September 19, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants