Added an error parameter to PrintUtils#error to allow logging of an accompany Error obj

This commit is contained in:
Kallum Jones
2022-08-03 17:18:21 +01:00
parent 6b700d465b
commit fc18d70e49
3 changed files with 12 additions and 3 deletions

View File

@ -47,7 +47,7 @@ export default class ModManager {
static createLogger(): Logger {
let logger = pino({base: {pid: undefined, hostname: undefined}}, pino.destination({dest: this.LOG_FILE}));
process.on("uncaughtException", error => {
logger.error(error);
PrintUtils.error(error.message, error);
setTimeout(() => process.exit(1), 1)
})