From 531b83a032a74bf7d1525960e2bfa8d9495b62a2 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Wed, 19 Feb 2014 13:32:41 +0000 Subject: [PATCH] added more logging --- services/filestore/app/coffee/FileConverter.coffee | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/filestore/app/coffee/FileConverter.coffee b/services/filestore/app/coffee/FileConverter.coffee index 94323c0677..67de922c9e 100644 --- a/services/filestore/app/coffee/FileConverter.coffee +++ b/services/filestore/app/coffee/FileConverter.coffee @@ -21,6 +21,10 @@ module.exports = timeout: twoMinsInMs exec args, opts, (err, stdout, stderr)-> timer.done() + if err? + logger.err err:err, stderr:stderr, sourcePath:sourcePath, requestedFormat:requestedFormat, "something went wrong converting file" + else + logger.log sourcePath:sourcePath, requestedFormat:requestedFormat, "finished converting file" callback(err, destPath) thumbnail: (sourcePath, callback)-> @@ -36,6 +40,10 @@ module.exports = opts = timeout: twoMinsInMs exec args, opts,(err, stdout, stderr)-> + if err? + logger.err err:err, stderr:stderr, sourcePath:sourcePath, "something went wrong converting file to preview" + else + logger.log sourcePath:sourcePath, "finished thumbnailing file" callback(err, destPath) preview: (sourcePath, callback)-> @@ -51,4 +59,8 @@ module.exports = opts = timeout: twoMinsInMs exec args, opts,(err, stdout, stderr)-> + if err? + logger.err err:err, stderr:stderr, sourcePath:sourcePath, "something went wrong converting file to preview" + else + logger.log sourcePath:sourcePath, "finished converting file to preview" callback(err, destPath)