This commit is contained in:
Bryan Ashby 2022-08-12 14:28:18 -06:00
parent c9d9b5336c
commit cc788056ea
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
2 changed files with 28 additions and 7 deletions

View File

@ -1129,7 +1129,10 @@ function FTNMessageScanTossModule() {
],
err => {
if (err) {
Log.warn({ error: err.message }, 'Error exporting message');
Log.warn(
{ error: err.message },
`Error exporting message: ${err.message}`
);
}
return nextMessageOrUuid(null);
}
@ -1699,7 +1702,7 @@ function FTNMessageScanTossModule() {
uuid: message.messageUuid,
MSGID: msgId,
},
'Not importing non-unique message'
`Not importing non-unique message "${message.subject}"`
);
return next(null);
@ -1726,6 +1729,7 @@ function FTNMessageScanTossModule() {
Log.warn(finalStats, 'Import completed with error(s)');
} else {
// :TODO: Output basic stats - total counts - to this message:
Log.info(finalStats, 'Import complete');
}
@ -1816,7 +1820,9 @@ function FTNMessageScanTossModule() {
path: paths.join(importDir, packetFile),
error: err.toString(),
},
'Failed to import packet file'
`Failed to import packet file "${paths.basename(
packetFile
)}"`
);
rejects.push(packetFile);
@ -2360,7 +2366,9 @@ function FTNMessageScanTossModule() {
reason: err.reason,
tic: ticFileInfo.filePath,
},
'Failed to import/update TIC'
`Failed to import/update TIC for "${paths.basename(
ticFileInfo.filePath
)}"`
);
} else {
Log.info(
@ -2369,7 +2377,9 @@ function FTNMessageScanTossModule() {
file: ticFileInfo.filePath,
area: localInfo.areaTag,
},
'TIC imported successfully'
`TIC imported "${paths.basename(ticFileInfo.filePath)}" -> ${
localInfo.areaTag
}`
);
}
return cb(err);

View File

@ -120,8 +120,19 @@ Methods indicated above with `()` in their name such as `enter()` are overridabl
Many helper methods exist and are available to code inheriting from `MenuModule`. Below are some examples. Poke around at [menu_module.js](../../../core/menu_module.js) to discover more!
### Views & View Controller
* `displayAsset()`
* `prepViewController()`
#### `displayAsset(name | Buffer, options, callback)`:
Display an asset by `name` or by supplying an `Buffer`.
`options` is an optional Object with any of the following properties:
* `clearScreen` (Boolean): Should the screen be cleared first?
* `encoding` (String): Encoding of `Buffer` if used. Defaults to `cp437`.
* `font` (String): SyncTERM style font to use.
* `trailingLF` (Boolean): Should a trailing LF be allowed?
* `startRow` (Number): Row in which to start drawing at
#### `prepViewController(name, formId, mciMap, callback)`:
Prepares the menu's View Controller for a form of `name` and `formId` using the supplied `mciMap`. `callback` has the following siguature: `(err, viewController, created)` where `created` is `true` if a new View Controller was made.
* `prepViewControllerWithArt()`
* `displayArtAndPrepViewController()`
* `setViewText()`