Files
html/api/ambre-pw-readlog-latest.php
opus 0eb4825f7d
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
auto-sync-2355
2026-04-21 23:55:03 +02:00

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]);
}
}