<?php /* -*- Mode: PHP; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set sw=2 ts=2 et tw=80 : */ require_once 'inc/LogParser.php'; require_once 'inc/GeneralErrorFilter.php'; require_once 'inc/ShortLogGenerator.php'; require_once 'inc/FullLogGenerator.php'; require_once 'inc/GzipUtils.php'; require_once 'inc/RunForLog.php'; require_once 'inc/Communication.php'; Headers::send(Headers::ALLOW_CROSS_ORIGIN); $run = getRequestedRun(); $logParser = new LogParser($run, new GeneralErrorFilter()); try { // Create the plain text summary too, since we need to parse the // log for errors anyway. $logParser->ensureExcerptExists(); $viewFullLog = isset($_GET['full']) && $_GET['full'] == 1; $logGenerator = $viewFullLog ? new FullLogGenerator($logParser, $run) : new ShortLogGenerator($logParser, $run); $parsedLog = $logGenerator->ensureLogExists(); GzipUtils::passThru($parsedLog, "text/html"); } catch (Exception $e) { die($e->getMessage()); }
require_once 'inc/Communication.php'; Headers::send(Headers::ALLOW_CROSS_ORIGIN); $type = isset($_GET["type"]) ? $_GET["type"] : "plaintext"; $run = getRequestedRun(); try { if ($type == "reftest") { $logParser = new LogParser($run, new ReftestFailureFilter()); $reftestExcerpt = $logParser->ensureExcerptExists(); GzipUtils::passThru($reftestExcerpt, 'text/plain'); } else { if ($type == "tinderbox_print") { $logParser = new LogParser($run, new TinderboxPrintFilter()); $tinderboxPrintExcerpt = $logParser->ensureExcerptExists(); GzipUtils::passThru($tinderboxPrintExcerpt, 'text/plain'); } else { $logParser = new LogParser($run, new GeneralErrorFilter()); $rawErrorSummary = $logParser->ensureExcerptExists(); if ($type != "annotated") { GzipUtils::passThru($rawErrorSummary, 'text/plain'); } else { date_default_timezone_set('America/Los_Angeles'); $logDescription = $run['buildername'] . ' on ' . date("Y-m-d H:i:s", $run['starttime']); $annotatedSummaryGenerator = new AnnotatedSummaryGenerator($rawErrorSummary, $logDescription); $annotatedSummary = $annotatedSummaryGenerator->ensureAnnotatedSummaryExists(); GzipUtils::passThru($annotatedSummary, 'text/plain'); } } } } catch (Exception $e) { die("Log not available."); }