19 lines
581 B
PHP
19 lines
581 B
PHP
<?php
|
|
header("Content-Type: text/plain");
|
|
// Get the debug2 log specifically
|
|
$log = "/tmp/ambre-pw-run-20260421-215101.log";
|
|
if (file_exists($log)) {
|
|
echo "=== $log ===\n";
|
|
echo "Size: " . filesize($log) . "B\n\n";
|
|
echo @file_get_contents($log);
|
|
} else {
|
|
// Get latest log
|
|
$logs = glob("/tmp/ambre-pw-run-*.log");
|
|
usort($logs, function($a,$b){return filemtime($b)-filemtime($a);});
|
|
if ($logs) {
|
|
echo "=== " . basename($logs[0]) . " ===\n";
|
|
echo "Size: " . filesize($logs[0]) . "B\n\n";
|
|
echo @file_get_contents($logs[0]);
|
|
}
|
|
}
|