mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-14 09:18:22 +02:00
Update:Log uncaught exceptions to crash_logs.txt #706 & cleanup logger
This commit is contained in:
@ -134,10 +134,13 @@ class LibraryScan {
|
||||
}
|
||||
|
||||
async saveLog() {
|
||||
await Logger.logManager.ensureScanLogDir()
|
||||
const scanLogDir = Path.join(global.MetadataPath, 'logs', 'scans')
|
||||
|
||||
const logDir = Path.join(global.MetadataPath, 'logs', 'scans')
|
||||
const outputPath = Path.join(logDir, this.logFilename)
|
||||
if (!(await fs.pathExists(scanLogDir))) {
|
||||
await fs.mkdir(scanLogDir)
|
||||
}
|
||||
|
||||
const outputPath = Path.join(scanLogDir, this.logFilename)
|
||||
const logLines = [JSON.stringify(this.toJSON())]
|
||||
this.logs.forEach(l => {
|
||||
logLines.push(JSON.stringify(l))
|
||||
|
Reference in New Issue
Block a user