diff mbox series

[OSSTEST,01/21] ts-hosts-allocate-Executive: with -U, just append to the same logfile

Message ID 20190418163158.11408-2-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show
Series Abandon jobs which are unreasonably delaying their flight | expand

Commit Message

Ian Jackson April 18, 2019, 4:31 p.m. UTC
This is much more convenient for ad-hoc use.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-hosts-allocate-Executive | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index dcfc70f2..3da138b1 100755
--- a/ts-hosts-allocate-Executive
+++ b/ts-hosts-allocate-Executive
@@ -75,16 +75,18 @@  sub setup () {
 
     $taskid= findtask();
 
-    my $logbase = "hosts-allocate.debug".($compressdebug?".gz":"");
-    my $logfh = open_unique_stashfile \$logbase;
+    my $logbase = "hosts-allocate.debug";
     if ($compressdebug) {
+	$logbase .= ".gz";
+	my $logfh = open_unique_stashfile \$logbase;
 	my $logchild = open DEBUG, "|-";  defined $logchild or die $!;
 	if (!$logchild) {
 	    open STDOUT, ">&", $logfh or die $!;
 	    exec "gzip" or die $!;
 	}
     } else {
-	open DEBUG, ">&", $logfh or die $!;
+	my $logfh = "$stash/$logbase";
+	open DEBUG, ">>", $logfh or die $!;
     }
     DEBUG->autoflush(1);
     logm("host allocation debug log in $logbase");