m***@tempo.com
2017-01-29 00:45:17 UTC
I'm running a powershell script viaa TFS and want to write a log file to
stderr. I've tried using write-error but all the line feeds are removed
when writing and the result is difficult to read.
What I'm doing is:
$c=Get-Content logfile.txt
Write-Error "$c"
But this writes everything on one line and when this gets back to TFS
it's shown as one line in the browser window with a large horizontal
scroll bar and it's not readable.
Is there a better way to write a file to standard error so that it
retains it's line breaks?
stderr. I've tried using write-error but all the line feeds are removed
when writing and the result is difficult to read.
What I'm doing is:
$c=Get-Content logfile.txt
Write-Error "$c"
But this writes everything on one line and when this gets back to TFS
it's shown as one line in the browser window with a large horizontal
scroll bar and it's not readable.
Is there a better way to write a file to standard error so that it
retains it's line breaks?