From bbd70f2fea294f4de9102a86794c2e5e6a60e2a4 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Mon, 1 Jan 2018 15:13:56 -0700 Subject: [PATCH] Minor log changes --- core/oputil/oputil_message_base.js | 10 ++++------ core/scanner_tossers/ftn_bso.js | 8 ++++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/core/oputil/oputil_message_base.js b/core/oputil/oputil_message_base.js index 77a63e9f..ac1d42fc 100644 --- a/core/oputil/oputil_message_base.js +++ b/core/oputil/oputil_message_base.js @@ -109,13 +109,11 @@ function areaFix() { return callback(null, message); }, function persistMessage(message, callback) { - // - // :TODO: - // - Persist message in private outgoing (sysop out box) - // - Make necessary changes such that the message is exported properly - // - console.log(message); + // :TODO: Persist message in private outgoing (sysop out box) (TBD: implementation) message.persist(err => { + if(!err) { + console.log('AreaFix message persisted and will be exported as per configuration'); + } return callback(err); }); } diff --git a/core/scanner_tossers/ftn_bso.js b/core/scanner_tossers/ftn_bso.js index 354755fd..e8124f1a 100644 --- a/core/scanner_tossers/ftn_bso.js +++ b/core/scanner_tossers/ftn_bso.js @@ -2051,11 +2051,11 @@ FTNMessageScanTossModule.prototype.startup = function(cb) { let self = this; - function tryImportNow(reasonDesc) { + function tryImportNow(reasonDesc, extraInfo) { if(!importing) { importing = true; - Log.info( { module : exports.moduleInfo.name }, reasonDesc); + Log.info( Object.assign({ module : exports.moduleInfo.name }, extraInfo), reasonDesc); self.performImport( () => { importing = false; @@ -2129,7 +2129,7 @@ FTNMessageScanTossModule.prototype.startup = function(cb) { watcher.on(event, (fileName, fileRoot) => { const eventPath = paths.join(fileRoot, fileName); if(paths.join(fileRoot, fileName) === importSchedule.watchFile) { - tryImportNow(`Performing import/toss due to @watch: ${eventPath} (${event})`); + tryImportNow('Performing import/toss due to @watch', { eventPath, event } ); } }); }); @@ -2140,7 +2140,7 @@ FTNMessageScanTossModule.prototype.startup = function(cb) { // fse.exists(importSchedule.watchFile, exists => { if(exists) { - tryImportNow(`Performing import/toss due to @watch: ${importSchedule.watchFile} (initial exists)`); + tryImportNow('Performing import/toss due to @watch', { eventPath : importSchedule.watchFile, event : 'initial exists' } ); } }); }