diff --git a/health-check.sh b/health-check.sh index a4ef0dc..4248f6e 100644 --- a/health-check.sh +++ b/health-check.sh @@ -49,6 +49,8 @@ do if [[ $commit == true ]] then echo $dateTime, $result >> "logs/${key}_report.log" + # By default we keep 2000 last log entries. Feel free to modify this to meet your needs. + echo "$(tail -2000 logs/${key}_report.log)" > "logs/${key}_report.log" else echo " $dateTime, $result" fi