forked from lix-project/hydra
Serve raw uncompressed logs directly
This commit is contained in:
parent
fd7e37ef89
commit
6655ada236
|
@ -145,7 +145,6 @@ sub showLog {
|
||||||
my ($c, $mode, $drvPath, @outPaths) = @_;
|
my ($c, $mode, $drvPath, @outPaths) = @_;
|
||||||
|
|
||||||
my $logPath = findLog($c, $drvPath, @outPaths);
|
my $logPath = findLog($c, $drvPath, @outPaths);
|
||||||
print STDERR "log = $logPath\n";
|
|
||||||
|
|
||||||
notFound($c, "The build log of derivation ‘$drvPath’ is not available.") unless defined $logPath;
|
notFound($c, "The build log of derivation ‘$drvPath’ is not available.") unless defined $logPath;
|
||||||
|
|
||||||
|
@ -159,9 +158,13 @@ sub showLog {
|
||||||
}
|
}
|
||||||
|
|
||||||
elsif ($mode eq "raw") {
|
elsif ($mode eq "raw") {
|
||||||
|
if ($logPath !~ /.bz2$/) {
|
||||||
|
$c->serve_static_file($logPath);
|
||||||
|
} else {
|
||||||
$c->stash->{'plain'} = { data => (scalar logContents($logPath)) || " " };
|
$c->stash->{'plain'} = { data => (scalar logContents($logPath)) || " " };
|
||||||
$c->forward('Hydra::View::Plain');
|
$c->forward('Hydra::View::Plain');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
elsif ($mode eq "tail-reload") {
|
elsif ($mode eq "tail-reload") {
|
||||||
my $url = $c->request->uri->as_string;
|
my $url = $c->request->uri->as_string;
|
||||||
|
|
Loading…
Reference in a new issue