-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Remove WriteVerbose statement from ConvertTo-Json #7487
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
Remove WriteVerbose statement from ConvertTo-Json #7487
Conversation
|
@devblackops I wonder do you see the verbose messages without |
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.
@devblackops Please also remove the message string which would no longer be used after this pr:
PowerShell/src/Microsoft.PowerShell.Commands.Utility/resources/UtilityCommonStrings.resx
Lines 177 to 179 in 791159d
| <data name="ConvertToJsonProcessValueVerboseMessage" xml:space="preserve"> | |
| <value>Processing object of type [{0}] at depth {1}</value> | |
| </data> |
|
@iSazonov The messages aren't shown without It's easy enough to suppress the verbose output with |
|
@markekraus I pushed a commit to remove the resource string. |
dantraMSFT
left a comment
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.
I agree the verbose statement doesn't add much value.
It was added when StopProcessing was added so I expect it was done for debugging purposes.
markekraus
left a comment
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.
LGTM
|
@devblackops Thanks for your contribution! |
…erShell#7487)" This reverts commit 8374a5c.
PR Summary
Fix #7486.
In PR #6392, a
WriteVerbosestatement was added toConvertTo-Jsonwhich I feel is unnecessary. On large or complex objects being serialized to json, this produces a ton of verbose messages which isn't adding any value to the end user. This PR removes that statement.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests