Skip to content

Commit

Permalink
Merge pull request #323 from montehurd/optimize-png-logging-tweak
Browse files Browse the repository at this point in the history
Enable detailed png optimizer logging
  • Loading branch information
montehurd authored May 17, 2024
2 parents 68a973f + f841a19 commit a8dbb95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions optimizePNG.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DIR_TO_MONITOR="/pixel/report"

OPTIMIZATION_TAG="OptimizedWithOptiPNG"

ENABLE_DEBUG_LOGGING=0
ENABLE_DEBUG_LOGGING=1

debug_log() {
if [ "$ENABLE_DEBUG_LOGGING" -ne 1 ]; then
Expand Down Expand Up @@ -33,11 +33,11 @@ wait_for_stable_file_size() {
size2=$(stat -c%s "$file")
attempt=$((attempt + 1))
if [ "$attempt" -eq "$max_attempts" ]; then
echo "Error: File is empty or size is unstable - $file"
debug_log "File is empty or size is unstable - $file"
return 1
fi
done
# echo "$attempt"
debug_log "wait_for_stable_file_size attempts: $attempt"
return 0
}

Expand Down

0 comments on commit a8dbb95

Please sign in to comment.