chore: print server logs in git-pull.php
This commit is contained in:
@@ -58,6 +58,16 @@ if (is_dir($targetDir . '/.git')) {
|
||||
echo "Warning: .git directory not found in path hierarchy. Falling back to script directory: " . getcwd() . "\n\n";
|
||||
}
|
||||
|
||||
echo "Last 30 lines of storage/logs/laravel.log:\n";
|
||||
$logFile = getcwd() . '/storage/logs/laravel.log';
|
||||
if (file_exists($logFile)) {
|
||||
$lines = file($logFile);
|
||||
echo implode('', array_slice($lines, -30));
|
||||
} else {
|
||||
echo "No log file found.\n";
|
||||
}
|
||||
echo "\n-----------------------------------------\n\n";
|
||||
|
||||
|
||||
// Helper function to execute commands with proc_open or standard fallbacks
|
||||
function execute($cmd) {
|
||||
|
||||
Reference in New Issue
Block a user