Przeglądaj źródła

added more logging

Henry Oswald 12 lat temu
rodzic
commit
b85017759e

+ 6 - 1
services/filestore/app/coffee/ImageOptimiser.coffee

@@ -10,6 +10,11 @@ module.exports =
 		args = "optipng #{localPath}"
 		args = "optipng #{localPath}"
 		opts =
 		opts =
 			timeout: 60 * 1000
 			timeout: 60 * 1000
-		exec args, opts, callback
+		exec args, opts,(err, stdout, stderr)->
+			if err?
+				logger.err err:err, stderr:stderr, localPath:localPath, "something went wrong converting compressPng"
+			else
+				logger.log  localPath:localPath, "finished compressPng file"
+			callback(err)