From 43142d22c22eb0b9a161e832855d9aee099a48cd Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 15 Nov 2024 17:11:04 -0800 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 9389 (#31791) Sync eng/common directory with azure-sdk-tools for PR https://github.com/Azure/azure-sdk-tools/pull/9389 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) Co-authored-by: Mike Harder --- eng/common/scripts/logging.ps1 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/eng/common/scripts/logging.ps1 b/eng/common/scripts/logging.ps1 index 91640cd7eb5..1b459d004ad 100644 --- a/eng/common/scripts/logging.ps1 +++ b/eng/common/scripts/logging.ps1 @@ -10,6 +10,26 @@ function LogInfo { Write-Host "$args" } +function LogNotice { + if (Test-SupportsGitHubLogging) { + Write-Host ("::notice::$args" -replace "`n", "%0D%0A") + } + else { + # No equivalent for DevOps + Write-Host "[Notice] $args" + } +} + +function LogNoticeForFile($file, $noticeString) { + if (Test-SupportsGitHubLogging) { + Write-Host ("::notice file=$file,line=1,col=1::$noticeString" -replace "`n", "%0D%0A") + } + else { + # No equivalent for DevOps + Write-Host "[Notice in file $file] $noticeString" + } +} + function LogWarning { if (Test-SupportsDevOpsLogging) { Write-Host ("##vso[task.LogIssue type=warning;]$args" -replace "`n", "%0D%0A")