Improved logging

This commit is contained in:
Daniel Sosnowski
2026-01-15 12:22:44 +01:00
parent f62a0c4951
commit 9bde61fa47

4
pdt.sh
View File

@@ -8,8 +8,10 @@ do
if [[ $output -gt 0 ]] if [[ $output -gt 0 ]]
then then
echo "ERROR! Exiting the program" echo "ERROR! Exiting the program"
echo "Processed file: $file - $output" | tee -a "/var/log/pdt$(date +%d%m%Y).log"
echo "Log saved to /var/log/pdt$(date +%d%m%Y).log"
exit 1 exit 1
fi fi
echo "Processed file: $file: $output" | tee -a "/var/log/pdt$(date +%d%m%Y).log" #echo "Processed file: $file: $output" | tee -a "/var/log/pdt$(date +%d%m%Y).log"
done done