chiark / gitweb /
Add optional logging of subprocess execution
authorKarl Hasselström <kha@treskal.com>
Sun, 26 Aug 2007 20:04:10 +0000 (22:04 +0200)
committerCatalin Marinas <catalin.marinas@gmail.com>
Wed, 29 Aug 2007 10:52:59 +0000 (11:52 +0100)
Now that the subprocess calling has been refactored and is in a nice
shape, it's quite simple to add some logging facilities. This patch
adds two separate log modes, switched by the STG_SUBPROCESS_LOG
environment variable:

  * Setting it to "debug" prints the executable name and all
    arguments, and the subprocess return value.

  * Setting it to "profile" prints just the executable name, and the
    (wallclock) time elapsed during the call.

  * Not setting it will disable logging, of course.

Signed-off-by: Karl Hasselström <kha@treskal.com>

No differences found