10000 Avoid collecting logs in buffer if a pipeline execution event is not going to be logged by daxian-dbw · Pull Request #15350 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Avoid collecting logs in buffer if a pipeline execution event is not going to be logged #15350

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

Merged
merged 3 commits into from
May 10, 2021

Conversation

daxian-dbw
Copy link
Member

PR Summary

A partial fix for #15341

The pipeline execution does a lot loggings. Today, we collect all the log strings in a buffer, and if the group policy EnableModuleLogging is enabled, strings from that buffer will be concatenated and used as the payload for writing out a pipeline execution-details event.

The thing is, in most cases, the group policy EnableModuleLogging is NOT enabled, and we are just collecting a lot logging strings in a buffer list in vain. This PR makes changes to avoid collecting logs when we are not going to log the pipeline execution-details event.

PR Checklist

Copy link
Collaborator
@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

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

This change looks good to me. Having read through the discussions, I think the latest changes reflect the outcome of those discussions and agree with where the code stands now.

@anmenaga anmenaga added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label May 10, 2021
@anmenaga anmenaga merged commit b16dac7 into PowerShell:master May 10, 2021
@daxian-dbw daxian-dbw deleted the logbuffer branch May 11, 2021 20:47
@daxian-dbw daxian-dbw added CL-Performanc AB86 e Indicates that a PR should be marked as a performance improvement in the Change Log and removed CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log labels May 11, 2021
@ghost
Copy link
ghost commented May 27, 2021

🎉v7.2.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-Performance Indicates that a PR should be marked as a performance improvement in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0