-
Notifications
You must be signed in to change notification settings - Fork 747
feat(core): add value length cap to partialClone #7150
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
c57b32d to
c0990b0
Compare
| describe('partialClone', function () { | ||
| it('omits properties by depth', function () { | ||
| const testObj = { | ||
| let multipleTypedObj: object |
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.
this is changed to avoid duplicate code lint fail.
| }) | ||
| }) | ||
|
|
||
| it('truncates properties by maxLength', function () { |
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.
We want to also test when there are other non object types like number or boolean
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.
Good callout, I've adjusted the test to avoid only using strings.
b0a3ea3 to
c49b272
Compare
|
failing test tracked in #7153 |
Problem
If we want to log a large json object with giant strings (think whole files), it can make the logs difficult to read. This is especially relevant when the underlying string values are not very important.
Solution
maxStringLengthoption.Notes
I am planning to port this utility to Flare to improve the logging experience there, and want this functionality to exist there however I thought this could be useful here too.
feature/xbranches will not be squash-merged at release time.