Fix Logger.fatal to be a promise to ensure crash_logs.txt write

This commit is contained in:
advplyr 2025-01-30 17:27:32 -06:00
parent 5ee6005112
commit c3aad9486c

View File

@ -117,7 +117,7 @@ class Logger {
if (level < LogLevel.FATAL && level < this.logLevel) return
const consoleMethod = Logger.ConsoleMethods[levelName]
console[consoleMethod](`[${this.timestamp}] ${levelName}:`, ...args)
this.#logToFileAndListeners(level, levelName, args, source)
return this.#logToFileAndListeners(level, levelName, args, source)
}
trace(...args) {
@ -141,7 +141,7 @@ class Logger {
}
fatal(...args) {
this.#log('FATAL', this.source, ...args)
return this.#log('FATAL', this.source, ...args)
}
note(...args) {