952 days continuous production uptime, 40k+ tp/s single node. Original corpo Bitbucket history not included — clean archive commit.
63 lines
2.0 KiB
PHP
63 lines
2.0 KiB
PHP
<?php
|
|
|
|
// initialization
|
|
/** @noinspection PhpIncludeInspection */
|
|
ob_start();
|
|
require_once(dirname(__DIR__) . '/config/sneakerstrap.inc');
|
|
ob_end_clean();
|
|
$logger = new gacErrorLogger();
|
|
|
|
$lines = 100;
|
|
if (isset($_GET['lines'])) {
|
|
if (is_numeric($_GET['lines'])) {
|
|
if ($_GET['lines'] < 0) {
|
|
$lines = 100;
|
|
} else {
|
|
$lines = intval($_GET['lines']);
|
|
}
|
|
}
|
|
}
|
|
|
|
$where = TEMPLATE_CLASS_LOGS;
|
|
if (isset($_GET['source'])) {
|
|
$where = $_GET['source'];
|
|
}
|
|
$dataDump = $logger->getLog($lines, $where);
|
|
?>
|
|
<HTML>
|
|
<HEAD>
|
|
<title>GA Log Dumper - Go ahead - Take a dump!</title>
|
|
<link rel="stylesheet" href="logger.css" type="text/css">
|
|
</HEAD>
|
|
<body>
|
|
<div class="title">
|
|
GA Dump of: <?= $where?> Collection
|
|
</div>
|
|
<div class="container">
|
|
<form method="get" action="dumper.php">
|
|
<input type="radio" value="Logs" name="source" checked> Logs
|
|
<input type="radio" value="Metrics" name="source"> Metrics
|
|
Lines to Display: <input type="text" value="100" size="5" name="lines">
|
|
<button type="submit">Go</button>
|
|
</form>
|
|
<div>
|
|
<?php
|
|
if (gasConfig::$settings[CONFIG_DATABASE][CONFIG_DATABASE_QUERY_TIMERS] == 1) {
|
|
$msg = sprintf(INFO_SLOW_QUERY_TIMERS, STRING_ENABLED) . sprintf(INFO_QUERY_TIMER_VALUES, gasConfig::$settings[CONFIG_DATABASE][CONFIG_DATABASE_TIMER_SLOW_QUERY_ALERT]);
|
|
echo $msg . $eos;
|
|
$msg = sprintf(INFO_SLOW_QUERY_TIMER_WARNINGS, STRING_ENABLED) . sprintf(INFO_QUERY_TIMER_VALUES, gasConfig::$settings[CONFIG_DATABASE][CONFIG_DATABASE_TIMER_SLOW_QUERY_WARNING]);
|
|
echo $msg . $eos;
|
|
} else {
|
|
$msg = sprintf(INFO_SLOW_QUERY_TIMERS, STRING_DISABLED);
|
|
echo $msg . $eos;
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="container">
|
|
<?php
|
|
echo (empty($dataDump)) ? 'No data found in GA collection:' . $where : $dataDump;
|
|
?>
|
|
</div>
|
|
</body>
|
|
</HTML>
|