Merge pull request #3919 from advplyr/fix_logger_fatal

Fix Logger.fatal to ensure crash_logs.txt is written to
This commit is contained in:
advplyr 2025-01-30 17:36:37 -06:00 committed by GitHub
commit 344de941ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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) {