Disable ##vso[task.debug] logs
BartNetJS opened this issue ยท 1 comments
BartNetJS commented
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch azure-pipelines-task-lib@3.1.10
for the project I'm working on.
I like to lower the log level.
Currently I don't see any option to avoid ##vso[task.debug] logs
So I patched the code with a check on SYSTEM_DEBUG
Here is the diff that solved my problem:
diff --git a/node_modules/azure-pipelines-task-lib/internal.js b/node_modules/azure-pipelines-task-lib/internal.js
index 09e093a..20545e8 100644
--- a/node_modules/azure-pipelines-task-lib/internal.js
+++ b/node_modules/azure-pipelines-task-lib/internal.js
@@ -257,7 +257,8 @@ function _error(message) {
}
exports._error = _error;
function _debug(message) {
- _command('task.debug', null, message);
+ if(process.env.SYSTEM_DEBUG === 'true')
+ _command('task.debug', null, message);
}
exports._debug = _debug;
// //-----------------------------------------------------
This issue body was partially generated by patch-package.
github-actions commented
This issue has had no activity in 90 days. Please comment if it is not actually stale