jenkins-bot has submitted this change and it was merged.

Change subject: JobRunnerPipeline: hints about stderr vs stdout
......................................................................


JobRunnerPipeline: hints about stderr vs stdout

We log either the rpc stderr or the stdout.  Hint about which standard
stream has been used in case it helps debugging.

Change-Id: I3dc16d0b6f15f78782bc1ed3f54163d34384cdfe
---
M src/JobRunnerPipeline.php
1 file changed, 8 insertions(+), 1 deletion(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/JobRunnerPipeline.php b/src/JobRunnerPipeline.php
index 7952d10..b7ef8ad 100755
--- a/src/JobRunnerPipeline.php
+++ b/src/JobRunnerPipeline.php
@@ -92,7 +92,14 @@
                                                   json_last_error(), 
json_last_error_msg());
                                        }
                                        $cmd = $procSlot['cmd'];
-                                       $error = $procSlot['stderr'] ?: 
$procSlot['stdout'];
+                                       if ( $procSlot['stderr'] ) {
+                                               $error = $procSlot['stderr'];
+                                               $cmd .= ' STDERR:';
+                                       } else {
+                                               $error = $procSlot['stdout'];
+                                               $cmd .= ' STDOUT:';
+                                       }
+
                                        if ( strlen( $error ) > 4096 ) { // 
truncate long errors
                                                $error = mb_substr( $error, 0, 
4096 ) . '...';
                                        }

-- 
To view, visit https://gerrit.wikimedia.org/r/311395
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3dc16d0b6f15f78782bc1ed3f54163d34384cdfe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/jobrunner
Gerrit-Branch: master
Gerrit-Owner: Hashar <has...@free.fr>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to