Search code examples
c#loggingazure-devopsazure-pipelines-release-pipelineazure-pipelines-tasks

Azure pipline Log adding message form C# in a run task


I would like to know if it is possible to log a message from C# code in the [azure pipeline log window (below) while using a run task. I need to print some variables that I can only get if my functions are executed in Azure in order to debug.

enter image description here


Solution

  • You can simply use System.Console.WriteLine and you will get it printed in logs.