Re: changing cf CLI trace stream from stdout to stderr

Stefan Mayr

Am 26.10.2016 um 02:10 schrieb Koper, Dies:
Hi Hector,

I have not been able to find a way to make that work on Windows.

CF_TRACE=/dev/stderr just creates a “dev” directory in the root of the
drive you run cf from with a file called “stderr”.
I can't remember having a pseudo file for stderr in Windows. The OS
provides default handles that can be used to write to stderr - no files.
That's why you have os.Stderr in golang
Maybe you could do the trick with named pipes and makepipe.exe included
in MSSQL - tooling around pipes is very limited in windows.


Dies Koper
Cloud Foundry Product Manager - CLI

*From:*Hector Rivas Gandara
*Sent:* Tuesday, October 25, 2016 10:27 PM
*To:* Discussions about Cloud Foundry projects and the system overall.
*Subject:* [cf-dev] Re: changing cf CLI trace stream from stdout to stderr


Have you tried sending CF_TRACE to /dev/stderr? Like this

CF_TRACE=/dev/stderr cf apps | less

I think it is system specific, but it should work on most of them.

On 25 October 2016 at 04:44, Koper, Dies <diesk(a)
<mailto:diesk(a)>> wrote:

Hi friends,

Currently, the cf CLI trace when enabled (“CF_TRACE=true”, `cf config
–trace true` or with the `-v` option) is directed to stdout.

Looking at other commands, e.g. `curl -v`, it’s common to send such
information to stderr.

This recently came up in the following issue.

I’d like to know whether anyone would be massively inconvenienced if we
fixed this to make cf CLI trace output go to stderr (e.g. because you
have many scripts expecting trace to be streamed to stdout, or not
expecting anything but errors and warnings to be streamed to stderr)?

Note that trace configured to output to a file would not be affected.


Dies Koper
Cloud Foundry Product Manager - CLI


Hector Rivas | GDS / Multi-Cloud PaaS


Join { to automatically receive all group messages.