Re: [RFC/PATCH] Trace into a file if GIT_TRACE can interpreted as a filename.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Aug 16, 2006, 21:18 UTC
- Message-ID
- <7vhd0c2xbz.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20060816225846.ae424b46.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
> So this change is not compatible with the previous > behavior, because stderr will not be used anymore if > GIT_TRACE is set to something other than "1" or "true". > No file locking is done. This maybe a problem.
I wonder if we can pass an already opened file descriptor to GIT_TRACE. E.g.
GIT_TRACE=9 make test 9>/var/tmp/trace.log
and make the trace code to emit the message with one write(2) to make sure messages from processes do not get mixed up in the middle.