I am pretty new to Azure Devops. Is there a way to connect and view the logs and the folders created in the self hosted agent of Azure devops pipeline.
2 Answers
You can do it in two ways
(i) While the build running on Azure devops with Hosted Agent the only way to see the logs is to wait for console output.
(ii) After the build finished you can download the logs az zip
The logs are in the _diag folder (the folder exist in agnet root folder).
Also you can use the API to get the logs
.

- 216,225
- 63
- 350
- 396
Agree with Sajeetharan,I will show you the specific place to view the logs and folders in the page through the following image.
After the build pipeline finished, you can click into a build record. There is a Logs option in this record. You can click on the specific job to view the log, or you can click the Download all logs button to download the complete log to local view.
You can click on the file container which under Build artifacts published in the Summary to view folders.
In addition,using api:
GET https://dev.azure.com/{organization}/{project}/_apis/build/builds/{buildId}/logs?api-version=5.0
to get logs is also a good method.
Could you mark Sajeetharan's answer if it can be helpful to you.

- 17,829
- 2
- 21
- 25