chore: print server logs in git-pull.php

This commit is contained in:
2026-09-18 10:03:16 +08:00
parent c84babc076
commit ec09402897
2 changed files with 22 additions and 0 deletions

View File

@@ -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) {

View File

@@ -7575,3 +7575,15 @@ Stack trace:
#82 /Applications/Herd.app/Contents/Resources/valet/server.php(167): require('/Users/dvapp/Do...')
#83 {main}
"}
[2026-09-18 01:42:39] local.ERROR: Uncaught Error: Call to undefined method PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getCellByColumnAndRow() in /Users/dvapp/Documents/HRM/app/Http/Controllers/EmployeeController.php:1352
Stack trace:
#0 Command line code(17): App\Http\Controllers\EmployeeController->parseFile(Object(Illuminate\Http\Request))
#1 {main}
thrown {"userId":1,"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Uncaught Error: Call to undefined method PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet::getCellByColumnAndRow() in /Users/dvapp/Documents/HRM/app/Http/Controllers/EmployeeController.php:1352
Stack trace:
#0 Command line code(17): App\\Http\\Controllers\\EmployeeController->parseFile(Object(Illuminate\\Http\\Request))
#1 {main}
thrown at /Users/dvapp/Documents/HRM/app/Http/Controllers/EmployeeController.php:1352)
[stacktrace]
#0 {main}
"}