#!/bin/bash

# View curl commands log
# Usage: ./view_curl_log.sh [lines]

CURL_LOG_FILE="logs/curl_commands.log"
LINES=${1:-50}

if [ ! -f "$CURL_LOG_FILE" ]; then
    echo "Curl log file not found: $CURL_LOG_FILE"
    echo "Make sure you've run the insert_menu_items service at least once."
    exit 1
fi

echo "Showing last $LINES lines from curl commands log:"
echo ""

tail -n "$LINES" "$CURL_LOG_FILE"
