]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/toss.go
Log handler's stdout/stderr
[nncp.git] / src / toss.go
index 4037831b59618319fdee6083127d91b83af21622..84890343a86b67777d672a4d7a6571b2be1a0577 100644 (file)
@@ -157,9 +157,12 @@ func jobProcess(
                        } else {
                                cmd.Stdin = pipeR
                        }
-                       output, err := cmd.Output()
+                       output, err := cmd.CombinedOutput()
                        if err != nil {
-                               ctx.LogE("rx-hande", les, err, func(les LEs) string {
+                               les = append(les, LE{"Output", strings.Split(
+                                       strings.Trim(string(output), "\n"), "\n"),
+                               })
+                               ctx.LogE("rx-handle", les, err, func(les LEs) string {
                                        return fmt.Sprintf(
                                                "Tossing exec %s/%s (%s): %s: handling",
                                                sender.Name, pktName,