@@ -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");
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(-)