Minor log changes

This commit is contained in:
Bryan Ashby
2018-01-01 15:13:56 -07:00
parent 6d929237d2
commit bbd70f2fea
2 changed files with 8 additions and 10 deletions

View File

@@ -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' } );
}
});
}