diff --git a/eng/common/scripts/logging.ps1 b/eng/common/scripts/logging.ps1 index c27bfee712be..4700a5716453 100644 --- a/eng/common/scripts/logging.ps1 +++ b/eng/common/scripts/logging.ps1 @@ -114,12 +114,12 @@ function LogJobFailure() { function ProcessMsBuildLogLine($line) { if (Test-SupportsDevOpsLogging) { - if ($line -like "*: warning*") { - return ("##vso[task.LogIssue type=warning;]$line" -replace "`n", "%0D%0A") - } - elseif ($line -like "*: error*") { + if ($line -like "*: error*") { return ("##vso[task.LogIssue type=error;]$line" -replace "`n", "%0D%0A") } + elseif ($line -like "*: warning*") { + return ("##vso[task.LogIssue type=warning;]$line" -replace "`n", "%0D%0A") + } } return $line }