Skip to content

feat: Add Write-ADOMessage function for colored logging in Azure DevOps#19

Open
sikksakk wants to merge 1 commit into
goodworkaround:mainfrom
sikksakk:feat_write-ADOMessage
Open

feat: Add Write-ADOMessage function for colored logging in Azure DevOps#19
sikksakk wants to merge 1 commit into
goodworkaround:mainfrom
sikksakk:feat_write-ADOMessage

Conversation

@sikksakk
Copy link
Copy Markdown

This pull request adds a new Write-ADOMessage function to the Azure DevOps Logging module, enabling colored messages in pipeline logs using ANSI color codes. It also updates the module manifest to export this new function and introduces internal mappings for color codes.

New Feature: Colored Message Output

  • Added the Write-ADOMessage function to allow writing messages with customizable foreground and background colors in Azure DevOps pipeline logs, supporting ANSI 4-bit color codes and an option to suppress newlines. (AzureDevOpsLogging/Public/Write-ADOMessage.ps1)
  • Introduced $script:ForegroundColorMap and $script:BackgroundColorMap in the module to map color names to their corresponding ANSI codes, supporting the new message function. (AzureDevOpsLogging/AzureDevOpsLogging.psm1)

Module Manifest Update

  • Updated the FunctionsToExport list in the module manifest to include Write-ADOMessage, making the new function available for use when the module is imported. (AzureDevOpsLogging/AzureDevOpsLogging.psd1)

Signed-off-by: Christopher Thomsen <christhomsen82@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants