TFS RM:如何关闭调试信息
TFS RM: How to turn off debug info
我在发布定义中使用目标机器上的 Powershell 任务。
此任务默认在日志中生成大量调试信息:
2016-04-19T09:29:13.9259230Z Executing the powershell script:
C:\Temp\agent2\tasks\PowerShellOnTargetMachines.0.2\PowerShellOnTargetMachines.ps1
2016-04-19T09:29:14.0665281Z ##[debug]Entering script
PowerShellOnTargetMachines.ps1 2016-04-19T09:29:14.0665281Z
2016-04-19T09:29:14.0665281Z ##[debug]protocol =
Http
2016-04-19T09:29:14.0665281Z ##[debug]resourceFilteringMethod =
machineNames
2016-04-19T09:29:14.0665281Z ##[debug]scriptPath = C:\RM\foobar13.10.16110.02-01\foobar.ps1
2016-04-19T09:29:14.0665281Z ##[debug]scriptArguments =
-foobar DEV -foobar "foobar"
2016-04-19T09:29:14.0821546Z ##[debug]runPowershellInParallel = true
2016-04-19T09:29:14.0665281Z ##[debug]testCertificate =
true
=2016-04-19T09:29:14.0665281Z ##[debug]initializationScriptPath =
2016-04-19T09:29:14.0665281Z ##[debug]machineNames
等等。
如何关闭此调试信息?
没有这样的设置来默认关闭调试信息。
但是您可以通过删除 -Verbose
标志来修改 PowerShellOnTargetMachines 任务中的 .ps1 文件,这样您将看不到调试信息。
我在发布定义中使用目标机器上的 Powershell 任务。
此任务默认在日志中生成大量调试信息:
2016-04-19T09:29:13.9259230Z Executing the powershell script: C:\Temp\agent2\tasks\PowerShellOnTargetMachines.0.2\PowerShellOnTargetMachines.ps1
2016-04-19T09:29:14.0665281Z ##[debug]Entering script PowerShellOnTargetMachines.ps1 2016-04-19T09:29:14.0665281Z
2016-04-19T09:29:14.0665281Z ##[debug]protocol = Http
2016-04-19T09:29:14.0665281Z ##[debug]resourceFilteringMethod = machineNames
2016-04-19T09:29:14.0665281Z ##[debug]scriptPath = C:\RM\foobar13.10.16110.02-01\foobar.ps1 2016-04-19T09:29:14.0665281Z ##[debug]scriptArguments = -foobar DEV -foobar "foobar"
2016-04-19T09:29:14.0821546Z ##[debug]runPowershellInParallel = true 2016-04-19T09:29:14.0665281Z ##[debug]testCertificate = true
=2016-04-19T09:29:14.0665281Z ##[debug]initializationScriptPath = 2016-04-19T09:29:14.0665281Z ##[debug]machineNames
等等。
如何关闭此调试信息?
没有这样的设置来默认关闭调试信息。
但是您可以通过删除 -Verbose
标志来修改 PowerShellOnTargetMachines 任务中的 .ps1 文件,这样您将看不到调试信息。