script to find the errors under $FMW_HOME/user_projects/domains/EBS_domain/servers/
#!/bin/bash
# Set the base log directory
LOG_DIR="$FMW_HOME/user_projects/domains/EBS_domain/servers"
# Define output file
OUTPUT_FILE="fmw_error_report_$(date +%Y%m%d_%H%M%S).log"
# Print starting message
echo "Searching for errors under: $LOG_DIR"
echo "Results will be saved to: $OUTPUT_FILE"
# Find and search all relevant log files
find "$LOG_DIR" -type f -name "*.log" | while read -r file; do
grep -Ei "ERROR|Exception|SEVERE" "$file" >> "$OUTPUT_FILE"
done
# Print completion message
echo "Search complete. Found errors are logged in: $OUTPUT_FILE"
No comments:
Post a Comment