Add test for scriptblock logging for macOS#7586
Merged
TravisEz13 merged 2 commits intoPowerShell:masterfrom Aug 21, 2018
Merged
Add test for scriptblock logging for macOS#7586TravisEz13 merged 2 commits intoPowerShell:masterfrom
TravisEz13 merged 2 commits intoPowerShell:masterfrom
Conversation
dantraMSFT
approved these changes
Aug 21, 2018
Contributor
dantraMSFT
left a comment
There was a problem hiding this comment.
Two minor comments; otherwise LGTM.
|
|
||
| if($item.LogId -notmatch '^\[com\.microsoft\.powershell') | ||
| { | ||
| Write-Verbose "logId: $($item.LogId)" -Verbose |
Contributor
There was a problem hiding this comment.
Suggest changing the verbose message slightly, to something like:
"Skipping logId: $($item.LogId)"
| { | ||
| [string] $filter = [string]::Format("com.microsoft.powershell.{0}: (", $id) | ||
| Get-Content @contentParms -filter {$_.Contains($filter)} | ConvertFrom-OsLog -Id $Id -After $After | Select-Object -First $maxItems | ||
| Write-Warning "this code path `Get-PSOsLog -TotalCount` should not be used if the message field is needed!" |
Contributor
There was a problem hiding this comment.
I suggest filing an issue against this. The intent is for the entire log entry to be returned even when using TotalCount.
Member
Author
|
I also submitted #7588 to fix the issue with window VSTS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Add test for scriptblock logging
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