From 35f955153376e442b82f28d786770e2385b4cc8b Mon Sep 17 00:00:00 2001 From: bill bittner Date: Fri, 30 Jun 2017 17:28:53 -0700 Subject: [PATCH] updated publish logging --- controllers/publishController.js | 7 ++++++- controllers/serveController.js | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/controllers/publishController.js b/controllers/publishController.js index ccc8967f..a9088181 100644 --- a/controllers/publishController.js +++ b/controllers/publishController.js @@ -8,8 +8,10 @@ function upsert (Model, values, condition) { .findOne({ where: condition }) .then(function (obj) { if (obj) { // update + logger.silly(`updating ${values.name}:${values.claimId} in File db`); return obj.update(values); } else { // insert + logger.silly(`creating ${values.name}:${values.claimId} in File db`); return Model.create(values); } }).catch(function (error) { @@ -38,7 +40,10 @@ module.exports = { fileType, nsfw : publishParams.metadata.nsfw, }, - { name: publishParams.name, claimId: result.claim_id } + { + name : publishParams.name, + claimId: result.claim_id, + } ).then(() => { // resolve the promise with the result from lbryApi.publishClaim; resolve(result); diff --git a/controllers/serveController.js b/controllers/serveController.js index 3d068994..97087a20 100644 --- a/controllers/serveController.js +++ b/controllers/serveController.js @@ -75,7 +75,7 @@ function getClaimAndHandleResponse (uri, height, resolve, reject) { .getClaim(uri) .then(({ name, claim_id, outpoint, file_name, download_path, mime_type, metadata }) => { // create entry in the db - logger.debug('creating new record in db'); + logger.silly(`creating "${name}" record in File db`); db.File .create({ name,