gpgscm: Make logging less verbose and more useful.
authorJustus Winter <justus@g10code.com>
Thu, 20 Apr 2017 09:49:17 +0000 (11:49 +0200)
committerJustus Winter <justus@g10code.com>
Mon, 24 Apr 2017 12:14:08 +0000 (14:14 +0200)
* tests/gpgscm/tests.scm (call-with-io): When being verbose, include
the pid in the output, and avoid duplicating the command arguments.

Signed-off-by: Justus Winter <justus@g10code.com>
tests/gpgscm/tests.scm

index c098218..b2dcc54 100644 (file)
       (es-fclose (:stdout h))
       (es-fclose (:stderr h))
       (if (> (*verbose*) 2)
-         (begin
-           (echo (stringify what) "returned:" result)
-           (echo (stringify what) "wrote to stdout:" out)
-           (echo (stringify what) "wrote to stderr:" err)))
+         (info "Child" (:pid h) "returned:"
+               `((command ,(stringify what))
+                 (status ,result)
+                 (stdout ,out)
+                 (stderr ,err))))
       (list result out err))))
 
 ;; Accessor function for the results of 'call-with-io'.  ':stdout' and