mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-18 01:11:30 +00:00
Merge branch 'master' into inode-bug-fix
This commit is contained in:
commit
d6fed92b11
87 changed files with 4539 additions and 751 deletions
|
|
@ -37,8 +37,13 @@ class LogManager {
|
|||
}
|
||||
|
||||
async ensureLogDirs() {
|
||||
await fs.ensureDir(this.DailyLogPath)
|
||||
await fs.ensureDir(this.ScanLogPath)
|
||||
try {
|
||||
await fs.ensureDir(this.DailyLogPath)
|
||||
await fs.ensureDir(this.ScanLogPath)
|
||||
} catch (error) {
|
||||
console.error(`[LogManager] Failed to create log directories at "${this.DailyLogPath}": ${error.message}`)
|
||||
throw new Error(`[LogManager] Failed to create log directories at "${this.DailyLogPath}"`, { cause: error })
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -169,7 +174,7 @@ class LogManager {
|
|||
/**
|
||||
* Most recent 5000 daily logs
|
||||
*
|
||||
* @returns {LogObject[]}
|
||||
* @returns {string}
|
||||
*/
|
||||
getMostRecentCurrentDailyLogs() {
|
||||
return this.currentDailyLog?.logs.slice(-5000) || []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue