On Thu, Jul 10, 2014 at 5:03 PM, Eli Zaretskii <eliz@gnu.org> wrote:

Of course, submitting (trivial) patches for adding a command to write
to stdout would probably be welcome as well.  But please note that
sometimes Emacs is invoked with stdout redirected to some obscure
file, or even with stdout being closed/invalid.

I used that very much for debugging before. Wonder if I still have that code somewhere?