feat: add functionality to clear Laravel log and display logs in runner script for improved user feedback
This commit is contained in:
@@ -666,6 +666,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="py-3 px-4 text-sm">
|
<td class="py-3 px-4 text-sm">
|
||||||
<div class="flex items-center gap-1">
|
<div class="flex items-center gap-1">
|
||||||
@@ -763,6 +764,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="py-3 px-4 text-sm">{{ strtoupper($rule['proto'] ?? 'any') }}</td>
|
<td class="py-3 px-4 text-sm">{{ strtoupper($rule['proto'] ?? 'any') }}</td>
|
||||||
<td class="py-3 px-4 text-sm">{{ $rule['dport'] ?? $rule['sport'] ?? '-' }}</td>
|
<td class="py-3 px-4 text-sm">{{ $rule['dport'] ?? $rule['sport'] ?? '-' }}</td>
|
||||||
|
|||||||
24
runner.sh
24
runner.sh
@@ -22,7 +22,8 @@ $divider
|
|||||||
[3] Run laravallog.sh
|
[3] Run laravallog.sh
|
||||||
[4] Run laravalcache.sh
|
[4] Run laravalcache.sh
|
||||||
[5] Clear Laravel log
|
[5] Clear Laravel log
|
||||||
[6] Exit
|
[6] Clear Laravel log and show logs
|
||||||
|
[7] Exit
|
||||||
$divider
|
$divider
|
||||||
Select an option by pressing the number key.
|
Select an option by pressing the number key.
|
||||||
EOF
|
EOF
|
||||||
@@ -58,6 +59,27 @@ EOF
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
6)
|
6)
|
||||||
|
# Clear Laravel log first
|
||||||
|
LOG_DATE=$(date +%Y-%m-%d)
|
||||||
|
LOG_FILE="${SCRIPT_DIR}/storage/logs/laravel-${LOG_DATE}.log"
|
||||||
|
if [ -f "$LOG_FILE" ]; then
|
||||||
|
> "$LOG_FILE"
|
||||||
|
echo "Log file cleared successfully: $LOG_FILE"
|
||||||
|
else
|
||||||
|
echo "Log file not found: $LOG_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Pause and wait for user input
|
||||||
|
echo
|
||||||
|
echo "Press Enter to continue and show the logs..."
|
||||||
|
read -r
|
||||||
|
|
||||||
|
# Then show logs
|
||||||
|
echo "Showing Laravel logs..."
|
||||||
|
[ -x "$git_log" ] || chmod +x "$git_log"
|
||||||
|
"$git_log"
|
||||||
|
;;
|
||||||
|
7)
|
||||||
echo "Goodbye!"
|
echo "Goodbye!"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user